vite 7.2.0-beta.0 → 7.2.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2406,16 +2406,6 @@ function emptyDir(dir, skip) {
2406
2406
  });
2407
2407
  }
2408
2408
  }
2409
- function copyDir(srcDir, destDir) {
2410
- fs.mkdirSync(destDir, { recursive: true });
2411
- for (const file of fs.readdirSync(srcDir)) {
2412
- const srcFile = path.resolve(srcDir, file);
2413
- if (srcFile === destDir) continue;
2414
- const destFile = path.resolve(destDir, file);
2415
- if (fs.statSync(srcFile).isDirectory()) copyDir(srcFile, destFile);
2416
- else fs.copyFileSync(srcFile, destFile);
2417
- }
2418
- }
2419
2409
  const ERR_SYMLINK_IN_RECURSIVE_READDIR = "ERR_SYMLINK_IN_RECURSIVE_READDIR";
2420
2410
  async function recursiveReaddir(dir) {
2421
2411
  if (!fs.existsSync(dir)) return [];
@@ -15447,6 +15437,8 @@ async function resolveHttpServer(app, httpsOptions) {
15447
15437
  const { createSecureServer } = await import("node:http2");
15448
15438
  return createSecureServer({
15449
15439
  maxSessionMemory: 1e3,
15440
+ streamResetBurst: 1e5,
15441
+ streamResetRate: 33,
15450
15442
  ...httpsOptions,
15451
15443
  allowHTTP1: true
15452
15444
  }, app);
@@ -32019,6 +32011,7 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
32019
32011
  const resolved = await resolve$4(path$13, importer);
32020
32012
  if (!resolved) return;
32021
32013
  if (isInNodeModules(resolved) && isOptimizable(resolved, optimizeDepsOptions)) return;
32014
+ if (shouldExternalizeDep(resolved, path$13)) return externalUnlessEntry({ path: path$13 });
32022
32015
  return {
32023
32016
  path: resolved,
32024
32017
  namespace: "html"
@@ -33795,7 +33788,10 @@ function prepareOutDir(outDirs, emptyOutDir, environment) {
33795
33788
  }).filter(Boolean), ".git"]);
33796
33789
  if (environment.config.build.copyPublicDir && publicDir && fs.existsSync(publicDir)) {
33797
33790
  if (!areSeparateFolders(outDir, publicDir)) environment.logger.warn(import_picocolors$5.default.yellow(`\n${import_picocolors$5.default.bold(`(!)`)} The public directory feature may not work correctly. outDir ${import_picocolors$5.default.white(import_picocolors$5.default.dim(outDir))} and publicDir ${import_picocolors$5.default.white(import_picocolors$5.default.dim(publicDir))} are not separate folders.\n`));
33798
- copyDir(publicDir, outDir);
33791
+ fs.cpSync(publicDir, outDir, {
33792
+ recursive: true,
33793
+ mode: fs.constants.COPYFILE_FICLONE
33794
+ });
33799
33795
  }
33800
33796
  }
33801
33797
  }
@@ -2597,6 +2597,9 @@ declare function createServer(inlineConfig?: InlineConfig | ResolvedConfig): Pro
2597
2597
  //#region src/node/plugins/html.d.ts
2598
2598
  interface HtmlTagDescriptor {
2599
2599
  tag: string;
2600
+ /**
2601
+ * attribute values will be escaped automatically if needed
2602
+ */
2600
2603
  attrs?: Record<string, string | boolean | undefined>;
2601
2604
  children?: string | HtmlTagDescriptor[];
2602
2605
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "7.2.0-beta.0",
3
+ "version": "7.2.0-beta.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",