vite 3.0.0-beta.2 → 3.0.0-beta.3

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.
@@ -1,5 +1,5 @@
1
- import { y as commonjsGlobal } from './dep-7c996900.js';
2
- import require$$1 from 'crypto';
1
+ import { y as commonjsGlobal } from './dep-b5bfa135.js';
2
+ import require$$5 from 'crypto';
3
3
  import 'node:fs';
4
4
  import 'node:path';
5
5
  import 'node:url';
@@ -11,7 +11,6 @@ import 'path';
11
11
  import 'fs';
12
12
  import 'events';
13
13
  import 'assert';
14
- import 'resolve';
15
14
  import 'util';
16
15
  import 'net';
17
16
  import 'url';
@@ -23,6 +22,7 @@ import 'node:os';
23
22
  import 'node:crypto';
24
23
  import 'node:util';
25
24
  import 'node:dns';
25
+ import 'resolve';
26
26
  import '../constants.js';
27
27
  import 'buffer';
28
28
  import 'querystring';
@@ -7521,7 +7521,7 @@ var pkcs5 = forge$i.pkcs5 = forge$i.pkcs5 || {};
7521
7521
 
7522
7522
  var crypto;
7523
7523
  if(forge$i.util.isNodejs && !forge$i.options.usePureJavaScript) {
7524
- crypto = require$$1;
7524
+ crypto = require$$5;
7525
7525
  }
7526
7526
 
7527
7527
  /**
@@ -8301,7 +8301,7 @@ var forge$f = forge$s;
8301
8301
  var _crypto$1 = null;
8302
8302
  if(forge$f.util.isNodejs && !forge$f.options.usePureJavaScript &&
8303
8303
  !process.versions['node-webkit']) {
8304
- _crypto$1 = require$$1;
8304
+ _crypto$1 = require$$5;
8305
8305
  }
8306
8306
 
8307
8307
  /* PRNG API */
@@ -11523,7 +11523,7 @@ if(typeof BigInteger === 'undefined') {
11523
11523
  var BigInteger = forge$8.jsbn.BigInteger;
11524
11524
  }
11525
11525
 
11526
- var _crypto = forge$8.util.isNodejs ? require$$1 : null;
11526
+ var _crypto = forge$8.util.isNodejs ? require$$5 : null;
11527
11527
 
11528
11528
  // shortcut for asn.1 API
11529
11529
  var asn1$5 = forge$8.asn1;
package/dist/node/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { performance } from 'node:perf_hooks';
2
2
  import { EventEmitter } from 'events';
3
- import { x as colors, q as createLogger, e as resolveConfig } from './chunks/dep-7c996900.js';
3
+ import { x as picocolors, q as createLogger, e as resolveConfig } from './chunks/dep-b5bfa135.js';
4
4
  import { VERSION } from './constants.js';
5
5
  import 'node:fs';
6
6
  import 'node:path';
@@ -11,7 +11,6 @@ import 'esbuild';
11
11
  import 'path';
12
12
  import 'fs';
13
13
  import 'assert';
14
- import 'resolve';
15
14
  import 'util';
16
15
  import 'net';
17
16
  import 'url';
@@ -23,6 +22,7 @@ import 'node:os';
23
22
  import 'node:crypto';
24
23
  import 'node:util';
25
24
  import 'node:dns';
25
+ import 'resolve';
26
26
  import 'crypto';
27
27
  import 'buffer';
28
28
  import 'querystring';
@@ -694,7 +694,7 @@ cli
694
694
  .action(async (root, options) => {
695
695
  // output structure is preserved even after bundling so require()
696
696
  // is ok here
697
- const { createServer } = await import('./chunks/dep-7c996900.js').then(function (n) { return n.D; });
697
+ const { createServer } = await import('./chunks/dep-b5bfa135.js').then(function (n) { return n.D; });
698
698
  try {
699
699
  const server = await createServer({
700
700
  root,
@@ -714,13 +714,13 @@ cli
714
714
  // @ts-ignore
715
715
  const viteStartTime = global.__vite_start_time ?? false;
716
716
  const startupDurationString = viteStartTime
717
- ? colors.dim(`ready in ${colors.white(colors.bold(Math.ceil(performance.now() - viteStartTime)))} ms`)
717
+ ? picocolors.exports.dim(`ready in ${picocolors.exports.white(picocolors.exports.bold(Math.ceil(performance.now() - viteStartTime)))} ms`)
718
718
  : '';
719
- info(`\n ${colors.green(`${colors.bold('VITE')} v${VERSION}`)} ${startupDurationString}\n`, { clear: !server.config.logger.hasWarned });
719
+ info(`\n ${picocolors.exports.green(`${picocolors.exports.bold('VITE')} v${VERSION}`)} ${startupDurationString}\n`, { clear: !server.config.logger.hasWarned });
720
720
  server.printUrls();
721
721
  }
722
722
  catch (e) {
723
- createLogger(options.logLevel).error(colors.red(`error when starting dev server:\n${e.stack}`), { error: e });
723
+ createLogger(options.logLevel).error(picocolors.exports.red(`error when starting dev server:\n${e.stack}`), { error: e });
724
724
  process.exit(1);
725
725
  }
726
726
  });
@@ -741,7 +741,7 @@ cli
741
741
  .option('--emptyOutDir', `[boolean] force empty outDir when it's outside of root`)
742
742
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
743
743
  .action(async (root, options) => {
744
- const { build } = await import('./chunks/dep-7c996900.js').then(function (n) { return n.C; });
744
+ const { build } = await import('./chunks/dep-b5bfa135.js').then(function (n) { return n.C; });
745
745
  const buildOptions = cleanOptions(options);
746
746
  try {
747
747
  await build({
@@ -756,7 +756,7 @@ cli
756
756
  });
757
757
  }
758
758
  catch (e) {
759
- createLogger(options.logLevel).error(colors.red(`error during build:\n${e.stack}`), { error: e });
759
+ createLogger(options.logLevel).error(picocolors.exports.red(`error during build:\n${e.stack}`), { error: e });
760
760
  process.exit(1);
761
761
  }
762
762
  });
@@ -765,7 +765,7 @@ cli
765
765
  .command('optimize [root]', 'pre-bundle dependencies')
766
766
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
767
767
  .action(async (root, options) => {
768
- const { optimizeDeps } = await import('./chunks/dep-7c996900.js').then(function (n) { return n.B; });
768
+ const { optimizeDeps } = await import('./chunks/dep-b5bfa135.js').then(function (n) { return n.B; });
769
769
  try {
770
770
  const config = await resolveConfig({
771
771
  root,
@@ -776,7 +776,7 @@ cli
776
776
  await optimizeDeps(config, options.force, true);
777
777
  }
778
778
  catch (e) {
779
- createLogger(options.logLevel).error(colors.red(`error when optimizing deps:\n${e.stack}`), { error: e });
779
+ createLogger(options.logLevel).error(picocolors.exports.red(`error when optimizing deps:\n${e.stack}`), { error: e });
780
780
  process.exit(1);
781
781
  }
782
782
  });
@@ -788,7 +788,7 @@ cli
788
788
  .option('--https', `[boolean] use TLS + HTTP/2`)
789
789
  .option('--open [path]', `[boolean | string] open browser on startup`)
790
790
  .action(async (root, options) => {
791
- const { preview } = await import('./chunks/dep-7c996900.js').then(function (n) { return n.E; });
791
+ const { preview } = await import('./chunks/dep-b5bfa135.js').then(function (n) { return n.E; });
792
792
  try {
793
793
  const server = await preview({
794
794
  root,
@@ -807,7 +807,7 @@ cli
807
807
  server.printUrls();
808
808
  }
809
809
  catch (e) {
810
- createLogger(options.logLevel).error(colors.red(`error when starting preview server:\n${e.stack}`), { error: e });
810
+ createLogger(options.logLevel).error(picocolors.exports.red(`error when starting preview server:\n${e.stack}`), { error: e });
811
811
  process.exit(1);
812
812
  }
813
813
  });
@@ -1,7 +1,7 @@
1
1
  import path, { resolve } from 'node:path';
2
2
  import { fileURLToPath } from 'node:url';
3
3
 
4
- var version = "3.0.0-beta.2";
4
+ var version = "3.0.0-beta.3";
5
5
 
6
6
  const VERSION = version;
7
7
  const DEFAULT_MAIN_FIELDS = [
@@ -50,7 +50,9 @@ const VALID_ID_PREFIX = `/@id/`;
50
50
  const NULL_BYTE_PLACEHOLDER = `__x00__`;
51
51
  const CLIENT_PUBLIC_PATH = `/@vite/client`;
52
52
  const ENV_PUBLIC_PATH = `/@vite/env`;
53
- const VITE_PACKAGE_DIR = resolve(fileURLToPath(import.meta.url), '../../..');
53
+ const VITE_PACKAGE_DIR = resolve(
54
+ // import.meta.url is `dist/node/constants.js` after bundle
55
+ fileURLToPath(import.meta.url), '../../..');
54
56
  const CLIENT_ENTRY = resolve(VITE_PACKAGE_DIR, 'dist/client/client.mjs');
55
57
  const ENV_ENTRY = resolve(VITE_PACKAGE_DIR, 'dist/client/env.mjs');
56
58
  const CLIENT_DIR = path.dirname(CLIENT_ENTRY);
@@ -650,6 +650,7 @@ export declare interface DepsOptimizer {
650
650
  delayDepsOptimizerUntil: (id: string, done: () => Promise<any>) => void;
651
651
  registerWorkersSource: (id: string) => void;
652
652
  resetRegisteredIds: () => void;
653
+ ensureFirstRun: () => void;
653
654
  options: DepOptimizationOptions;
654
655
  }
655
656
 
@@ -675,6 +676,10 @@ export declare interface ESBuildOptions extends EsbuildTransformOptions {
675
676
  include?: string | RegExp | string[] | RegExp[];
676
677
  exclude?: string | RegExp | string[] | RegExp[];
677
678
  jsxInject?: string;
679
+ /**
680
+ * This option is not respected. Use `build.minify` instead.
681
+ */
682
+ minify?: never;
678
683
  }
679
684
 
680
685
  export { EsbuildTransformOptions }
@@ -1,4 +1,4 @@
1
- export { b as build, j as createFilter, q as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, i as isDepsOptimizerEnabled, l as loadConfigFromFile, v as loadEnv, h as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, p as preview, g as resolveBaseUrl, e as resolveConfig, w as resolveEnvPrefix, a as resolvePackageData, r as resolvePackageEntry, u as searchForWorkspaceRoot, k as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-7c996900.js';
1
+ export { b as build, j as createFilter, q as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, i as isDepsOptimizerEnabled, l as loadConfigFromFile, v as loadEnv, h as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, p as preview, g as resolveBaseUrl, e as resolveConfig, w as resolveEnvPrefix, a as resolvePackageData, r as resolvePackageEntry, u as searchForWorkspaceRoot, k as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-b5bfa135.js';
2
2
  export { VERSION as version } from './constants.js';
3
3
  export { version as esbuildVersion } from 'esbuild';
4
4
  export { VERSION as rollupVersion } from 'rollup';
@@ -12,7 +12,6 @@ import 'path';
12
12
  import 'fs';
13
13
  import 'events';
14
14
  import 'assert';
15
- import 'resolve';
16
15
  import 'util';
17
16
  import 'net';
18
17
  import 'url';
@@ -24,6 +23,7 @@ import 'node:os';
24
23
  import 'node:crypto';
25
24
  import 'node:util';
26
25
  import 'node:dns';
26
+ import 'resolve';
27
27
  import 'crypto';
28
28
  import 'buffer';
29
29
  import 'querystring';