vite 3.0.0-alpha.13 → 3.0.0-alpha.14

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,14 +1,14 @@
1
1
  import require$$0 from 'postcss';
2
- import { x as commonjsGlobal } from './dep-5d9a8c71.js';
2
+ import { y as commonjsGlobal } from './dep-dc88b587.js';
3
3
  import path$2 from 'path';
4
4
  import require$$1 from 'crypto';
5
- import fs__default from 'fs';
5
+ import require$$0__default from 'fs';
6
6
  import require$$0$1 from 'util';
7
7
  import { l as lib$1 } from './dep-e8ca8d40.js';
8
8
 
9
- import { fileURLToPath as __cjs_fileURLToPath } from 'url';
10
- import { dirname as __cjs_dirname } from 'path';
11
- import { createRequire as __cjs_createRequire } from 'module';
9
+ import { fileURLToPath as __cjs_fileURLToPath } from 'node:url';
10
+ import { dirname as __cjs_dirname } from 'node:path';
11
+ import { createRequire as __cjs_createRequire } from 'node:module';
12
12
 
13
13
  const __filename = __cjs_fileURLToPath(import.meta.url);
14
14
  const __dirname = __cjs_dirname(__filename);
@@ -1482,7 +1482,7 @@ var _postcss$1 = require$$0;
1482
1482
 
1483
1483
  var _postcss2$1 = _interopRequireDefault$5(_postcss$1);
1484
1484
 
1485
- var _fs$1 = fs__default;
1485
+ var _fs$1 = require$$0__default;
1486
1486
 
1487
1487
  var _fs2 = _interopRequireDefault$5(_fs$1);
1488
1488
 
@@ -1638,7 +1638,7 @@ Object.defineProperty(saveJSON$1, "__esModule", {
1638
1638
  });
1639
1639
  saveJSON$1.default = saveJSON;
1640
1640
 
1641
- var _fs = fs__default;
1641
+ var _fs = require$$0__default;
1642
1642
 
1643
1643
  function saveJSON(cssFile, json) {
1644
1644
  return new Promise((resolve, reject) => {
@@ -1,6 +1,6 @@
1
- import { fileURLToPath as __cjs_fileURLToPath } from 'url';
2
- import { dirname as __cjs_dirname } from 'path';
3
- import { createRequire as __cjs_createRequire } from 'module';
1
+ import { fileURLToPath as __cjs_fileURLToPath } from 'node:url';
2
+ import { dirname as __cjs_dirname } from 'node:path';
3
+ import { createRequire as __cjs_createRequire } from 'node:module';
4
4
 
5
5
  const __filename = __cjs_fileURLToPath(import.meta.url);
6
6
  const __dirname = __cjs_dirname(__filename);
@@ -1,33 +1,45 @@
1
- import { x as commonjsGlobal } from './dep-5d9a8c71.js';
1
+ import { y as commonjsGlobal } from './dep-dc88b587.js';
2
2
  import require$$1 from 'crypto';
3
- import 'fs';
4
- import 'path';
5
- import 'url';
6
- import 'perf_hooks';
7
- import 'module';
3
+ import 'node:fs';
4
+ import 'node:path';
5
+ import 'node:url';
6
+ import 'node:perf_hooks';
7
+ import 'node:module';
8
8
  import 'tty';
9
9
  import 'esbuild';
10
+ import 'path';
11
+ import 'fs';
10
12
  import 'events';
11
13
  import 'assert';
12
14
  import 'resolve';
13
15
  import 'util';
14
16
  import 'net';
17
+ import 'url';
15
18
  import 'http';
16
19
  import 'stream';
17
20
  import 'os';
18
21
  import 'child_process';
22
+ import 'node:os';
23
+ import 'node:crypto';
24
+ import 'node:util';
25
+ import 'node:dns';
19
26
  import '../constants.js';
20
27
  import 'buffer';
21
28
  import 'querystring';
29
+ import 'module';
22
30
  import 'zlib';
23
31
  import 'https';
24
32
  import 'tls';
33
+ import 'node:http';
34
+ import 'node:https';
25
35
  import 'worker_threads';
26
36
  import 'readline';
37
+ import 'node:child_process';
38
+ import 'node:zlib';
27
39
 
28
- import { fileURLToPath as __cjs_fileURLToPath } from 'url';
29
- import { dirname as __cjs_dirname } from 'path';
30
- import { createRequire as __cjs_createRequire } from 'module';
40
+ import { fileURLToPath as __cjs_fileURLToPath } from 'node:url';
41
+ import { dirname as __cjs_dirname } from 'node:path';
42
+ import { createRequire as __cjs_createRequire } from 'node:module';
31
43
 
32
44
  const __filename = __cjs_fileURLToPath(import.meta.url);
33
45
  const __dirname = __cjs_dirname(__filename);
package/dist/node/cli.js CHANGED
@@ -1,29 +1,41 @@
1
- import { performance } from 'perf_hooks';
1
+ import { performance } from 'node:perf_hooks';
2
2
  import { EventEmitter } from 'events';
3
- import { w as colors, k as createLogger, e as resolveConfig } from './chunks/dep-5d9a8c71.js';
3
+ import { x as colors, q as createLogger, e as resolveConfig } from './chunks/dep-dc88b587.js';
4
4
  import { VERSION } from './constants.js';
5
- import 'fs';
6
- import 'path';
7
- import 'url';
8
- import 'module';
5
+ import 'node:fs';
6
+ import 'node:path';
7
+ import 'node:url';
8
+ import 'node:module';
9
9
  import 'tty';
10
10
  import 'esbuild';
11
+ import 'path';
12
+ import 'fs';
11
13
  import 'assert';
12
14
  import 'resolve';
13
15
  import 'util';
14
16
  import 'net';
17
+ import 'url';
15
18
  import 'http';
16
19
  import 'stream';
17
20
  import 'os';
18
21
  import 'child_process';
22
+ import 'node:os';
23
+ import 'node:crypto';
24
+ import 'node:util';
25
+ import 'node:dns';
19
26
  import 'crypto';
20
27
  import 'buffer';
21
28
  import 'querystring';
29
+ import 'module';
22
30
  import 'zlib';
23
31
  import 'https';
24
32
  import 'tls';
33
+ import 'node:http';
34
+ import 'node:https';
25
35
  import 'worker_threads';
26
36
  import 'readline';
37
+ import 'node:child_process';
38
+ import 'node:zlib';
27
39
 
28
40
  function toArr(any) {
29
41
  return any == null ? [] : Array.isArray(any) ? any : [any];
@@ -682,7 +694,7 @@ cli
682
694
  .action(async (root, options) => {
683
695
  // output structure is preserved even after bundling so require()
684
696
  // is ok here
685
- const { createServer } = await import('./chunks/dep-5d9a8c71.js').then(function (n) { return n.C; });
697
+ const { createServer } = await import('./chunks/dep-dc88b587.js').then(function (n) { return n.D; });
686
698
  try {
687
699
  const server = await createServer({
688
700
  root,
@@ -729,7 +741,7 @@ cli
729
741
  .option('--emptyOutDir', `[boolean] force empty outDir when it's outside of root`)
730
742
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
731
743
  .action(async (root, options) => {
732
- const { build } = await import('./chunks/dep-5d9a8c71.js').then(function (n) { return n.B; });
744
+ const { build } = await import('./chunks/dep-dc88b587.js').then(function (n) { return n.C; });
733
745
  const buildOptions = cleanOptions(options);
734
746
  try {
735
747
  await build({
@@ -753,7 +765,7 @@ cli
753
765
  .command('optimize [root]', 'pre-bundle dependencies')
754
766
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
755
767
  .action(async (root, options) => {
756
- const { optimizeDeps } = await import('./chunks/dep-5d9a8c71.js').then(function (n) { return n.A; });
768
+ const { optimizeDeps } = await import('./chunks/dep-dc88b587.js').then(function (n) { return n.B; });
757
769
  try {
758
770
  const config = await resolveConfig({
759
771
  root,
@@ -776,7 +788,7 @@ cli
776
788
  .option('--https', `[boolean] use TLS + HTTP/2`)
777
789
  .option('--open [path]', `[boolean | string] open browser on startup`)
778
790
  .action(async (root, options) => {
779
- const { preview } = await import('./chunks/dep-5d9a8c71.js').then(function (n) { return n.D; });
791
+ const { preview } = await import('./chunks/dep-dc88b587.js').then(function (n) { return n.E; });
780
792
  try {
781
793
  const server = await preview({
782
794
  root,
@@ -1,7 +1,7 @@
1
- import path, { resolve } from 'path';
2
- import { fileURLToPath } from 'url';
1
+ import path, { resolve } from 'node:path';
2
+ import { fileURLToPath } from 'node:url';
3
3
 
4
- var version = "3.0.0-alpha.13";
4
+ var version = "3.0.0-alpha.14";
5
5
 
6
6
  const VERSION = version;
7
7
  const DEFAULT_MAIN_FIELDS = [
@@ -1,26 +1,27 @@
1
1
  /// <reference types="node" />
2
2
 
3
- import type { Agent } from 'http';
3
+ import type { Agent } from 'node:http';
4
4
  import type { BuildOptions as BuildOptions_2 } from 'esbuild';
5
- import type { ClientRequest } from 'http';
6
- import type { ClientRequestArgs } from 'http';
5
+ import type { ClientRequest } from 'node:http';
6
+ import type { ClientRequestArgs } from 'node:http';
7
7
  import type { CustomPluginOptions } from 'rollup';
8
- import type { Duplex } from 'stream';
9
- import type { DuplexOptions } from 'stream';
8
+ import type { Duplex } from 'node:stream';
9
+ import type { DuplexOptions } from 'node:stream';
10
10
  import { TransformOptions as EsbuildTransformOptions } from 'esbuild';
11
- import { EventEmitter } from 'events';
12
- import * as events from 'events';
11
+ import { version as esbuildVersion } from 'esbuild';
12
+ import { EventEmitter } from 'node:events';
13
+ import * as events from 'node:events';
13
14
  import type { ExistingRawSourceMap } from 'rollup';
14
- import type * as fs from 'fs';
15
+ import type * as fs from 'node:fs';
15
16
  import type { GetManualChunk } from 'rollup';
16
- import * as http from 'http';
17
- import type { IncomingMessage } from 'http';
17
+ import * as http from 'node:http';
18
+ import type { IncomingMessage } from 'node:http';
18
19
  import type { InputOptions } from 'rollup';
19
20
  import type { LoadResult } from 'rollup';
20
21
  import type { ModuleFormat } from 'rollup';
21
22
  import type { ModuleInfo } from 'rollup';
22
- import type * as net from 'net';
23
- import type { OutgoingHttpHeaders } from 'http';
23
+ import type * as net from 'node:net';
24
+ import type { OutgoingHttpHeaders } from 'node:http';
24
25
  import type { OutputBundle } from 'rollup';
25
26
  import type { OutputChunk } from 'rollup';
26
27
  import type { PartialResolvedId } from 'rollup';
@@ -32,22 +33,23 @@ import type { ResolveIdResult } from 'rollup';
32
33
  import type { RollupError } from 'rollup';
33
34
  import type { RollupOptions } from 'rollup';
34
35
  import type { RollupOutput } from 'rollup';
36
+ import { VERSION as rollupVersion } from 'rollup';
35
37
  import type { RollupWatcher } from 'rollup';
36
38
  import type { SecureContextOptions } from 'tls';
37
- import type { Server } from 'http';
38
- import type { Server as Server_2 } from 'https';
39
- import type { ServerOptions as ServerOptions_2 } from 'https';
40
- import type { ServerResponse } from 'http';
39
+ import type { Server } from 'node:http';
40
+ import type { Server as Server_2 } from 'node:https';
41
+ import type { ServerOptions as ServerOptions_2 } from 'node:https';
42
+ import type { ServerResponse } from 'node:http';
41
43
  import type { SourceDescription } from 'rollup';
42
44
  import type { SourceMap } from 'rollup';
43
- import type * as stream from 'stream';
45
+ import type * as stream from 'node:stream';
44
46
  import type { TransformPluginContext } from 'rollup';
45
47
  import type { TransformResult as TransformResult_2 } from 'rollup';
46
48
  import type { TransformResult as TransformResult_3 } from 'esbuild';
47
- import type * as url from 'url';
48
- import type { URL as URL_2 } from 'url';
49
+ import type * as url from 'node:url';
50
+ import type { URL as URL_2 } from 'node:url';
49
51
  import type { WatcherOptions } from 'rollup';
50
- import type { ZlibOptions } from 'zlib';
52
+ import type { ZlibOptions } from 'node:zlib';
51
53
 
52
54
  export declare interface Alias {
53
55
  find: string | RegExp
@@ -102,6 +104,26 @@ export declare interface AwaitWriteFinishOptions {
102
104
  */
103
105
  export declare function build(inlineConfig?: InlineConfig): Promise<RollupOutput | RollupOutput[] | RollupWatcher>;
104
106
 
107
+ export declare type BuildAdvancedBaseConfig = BuildAdvancedBaseOptions & {
108
+ /**
109
+ * Base for assets and public files in case they should be different
110
+ */
111
+ assets?: string | BuildAdvancedBaseOptions;
112
+ public?: string | BuildAdvancedBaseOptions;
113
+ };
114
+
115
+ export declare interface BuildAdvancedBaseOptions {
116
+ /**
117
+ * Relative base. If true, every generated URL is relative and the dist folder
118
+ * can be deployed to any base or subdomain. Use this option when the base
119
+ * is unkown at build time
120
+ * @default false
121
+ */
122
+ relative?: boolean;
123
+ url?: string;
124
+ runtime?: (filename: string) => string;
125
+ }
126
+
105
127
  export declare interface BuildOptions {
106
128
  /**
107
129
  * Compatibility transform target. The transform is performed with esbuild
@@ -661,6 +683,8 @@ export declare type ESBuildTransformResult = Omit<TransformResult_3, 'map'> & {
661
683
  map: SourceMap;
662
684
  };
663
685
 
686
+ export { esbuildVersion }
687
+
664
688
  export declare interface ExperimentalOptions {
665
689
  /**
666
690
  * Append fake `&lang.(ext)` when queries are specified, to preseve the file extension for following plugins to process.
@@ -669,6 +693,19 @@ export declare interface ExperimentalOptions {
669
693
  * @default false
670
694
  */
671
695
  importGlobRestoreExtension?: boolean;
696
+ /**
697
+ * Build advanced base options. Allow finegrain contol over assets and public files base
698
+ *
699
+ * @experimental
700
+ */
701
+ buildAdvancedBaseOptions?: BuildAdvancedBaseConfig;
702
+ /**
703
+ * Enables support of HMR partial accept via `import.meta.hot.acceptExports`.
704
+ *
705
+ * @experimental
706
+ * @default false
707
+ */
708
+ hmrPartialAccept?: boolean;
672
709
  }
673
710
 
674
711
  export declare type ExportsData = {
@@ -1337,7 +1374,7 @@ export declare class ModuleGraph {
1337
1374
  * If there are dependencies that no longer have any importers, they are
1338
1375
  * returned as a Set.
1339
1376
  */
1340
- updateModuleInfo(mod: ModuleNode, importedModules: Set<string | ModuleNode>, acceptedModules: Set<string | ModuleNode>, isSelfAccepting: boolean, ssr?: boolean): Promise<Set<ModuleNode> | undefined>;
1377
+ updateModuleInfo(mod: ModuleNode, importedModules: Set<string | ModuleNode>, importedBindings: Map<string, Set<string>> | null, acceptedModules: Set<string | ModuleNode>, acceptedExports: Set<string> | null, isSelfAccepting: boolean, ssr?: boolean): Promise<Set<ModuleNode> | undefined>;
1341
1378
  ensureEntryFromUrl(rawUrl: string, ssr?: boolean): Promise<ModuleNode>;
1342
1379
  createFileOnlyEntry(file: string): ModuleNode;
1343
1380
  resolveUrl(url: string, ssr?: boolean): Promise<ResolvedUrl>;
@@ -1359,6 +1396,8 @@ export declare class ModuleNode {
1359
1396
  importers: Set<ModuleNode>;
1360
1397
  importedModules: Set<ModuleNode>;
1361
1398
  acceptedHmrDeps: Set<ModuleNode>;
1399
+ acceptedHmrExports: Set<string> | null;
1400
+ importedBindings: Map<string, Set<string>> | null;
1362
1401
  isSelfAccepting?: boolean;
1363
1402
  transformResult: TransformResult | null;
1364
1403
  ssrTransformResult: TransformResult | null;
@@ -1579,7 +1618,7 @@ export declare interface PreviewServer {
1579
1618
  /**
1580
1619
  * Print server urls
1581
1620
  */
1582
- printUrls: () => void;
1621
+ printUrls: () => Promise<void>;
1583
1622
  }
1584
1623
 
1585
1624
  export declare type PreviewServerHook = (server: {
@@ -1607,8 +1646,19 @@ export declare interface PrunePayload {
1607
1646
  paths: string[]
1608
1647
  }
1609
1648
 
1649
+ /**
1650
+ * Resolve base url. Note that some users use Vite to build for non-web targets like
1651
+ * electron or expects to deploy
1652
+ */
1653
+ export declare function resolveBaseUrl(base: string | undefined, isBuild: boolean, logger: Logger, optionName: string): string;
1654
+
1610
1655
  export declare function resolveConfig(inlineConfig: InlineConfig, command: 'build' | 'serve', defaultMode?: string): Promise<ResolvedConfig>;
1611
1656
 
1657
+ export declare type ResolvedBuildAdvancedBaseConfig = BuildAdvancedBaseOptions & {
1658
+ assets: BuildAdvancedBaseOptions;
1659
+ public: BuildAdvancedBaseOptions;
1660
+ };
1661
+
1612
1662
  export declare type ResolvedBuildOptions = Required<BuildOptions>;
1613
1663
 
1614
1664
  export declare type ResolvedConfig = Readonly<Omit<UserConfig, 'plugins' | 'assetsInclude' | 'optimizeDeps' | 'worker'> & {
@@ -1640,8 +1690,13 @@ export declare type ResolvedConfig = Readonly<Omit<UserConfig, 'plugins' | 'asse
1640
1690
  /* Excluded from this release type: packageCache */
1641
1691
  worker: ResolveWorkerOptions;
1642
1692
  appType: AppType;
1693
+ experimental: ResolvedExperimentalOptions;
1643
1694
  }>;
1644
1695
 
1696
+ export declare type ResolvedExperimentalOptions = Required<ExperimentalOptions> & {
1697
+ buildAdvancedBaseOptions: ResolvedBuildAdvancedBaseConfig;
1698
+ };
1699
+
1645
1700
  export declare interface ResolvedPreviewOptions extends PreviewOptions {
1646
1701
  }
1647
1702
 
@@ -1891,6 +1946,8 @@ export declare interface RollupDynamicImportVarsOptions {
1891
1946
  warnOnError?: boolean
1892
1947
  }
1893
1948
 
1949
+ export { rollupVersion }
1950
+
1894
1951
  /**
1895
1952
  * Search up for the nearest workspace root
1896
1953
  */
@@ -2414,7 +2471,7 @@ export declare interface ViteDevServer {
2414
2471
  /**
2415
2472
  * Print server urls
2416
2473
  */
2417
- printUrls(): void;
2474
+ printUrls(): Promise<void>;
2418
2475
  /**
2419
2476
  * Restart the server.
2420
2477
  *
@@ -1,29 +1,42 @@
1
- export { b as build, h as createFilter, k as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, i as isDepsOptimizerEnabled, l as loadConfigFromFile, u as loadEnv, g as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, p as preview, e as resolveConfig, v as resolveEnvPrefix, a as resolvePackageData, r as resolvePackageEntry, q as searchForWorkspaceRoot, j as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-5d9a8c71.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-dc88b587.js';
2
2
  export { VERSION as version } from './constants.js';
3
- import 'fs';
4
- import 'path';
5
- import 'url';
6
- import 'perf_hooks';
7
- import 'module';
3
+ export { version as esbuildVersion } from 'esbuild';
4
+ export { VERSION as rollupVersion } from 'rollup';
5
+ import 'node:fs';
6
+ import 'node:path';
7
+ import 'node:url';
8
+ import 'node:perf_hooks';
9
+ import 'node:module';
8
10
  import 'tty';
9
- import 'esbuild';
11
+ import 'path';
12
+ import 'fs';
10
13
  import 'events';
11
14
  import 'assert';
12
15
  import 'resolve';
13
16
  import 'util';
14
17
  import 'net';
18
+ import 'url';
15
19
  import 'http';
16
20
  import 'stream';
17
21
  import 'os';
18
22
  import 'child_process';
23
+ import 'node:os';
24
+ import 'node:crypto';
25
+ import 'node:util';
26
+ import 'node:dns';
19
27
  import 'crypto';
20
28
  import 'buffer';
21
29
  import 'querystring';
30
+ import 'module';
22
31
  import 'zlib';
23
32
  import 'https';
24
33
  import 'tls';
34
+ import 'node:http';
35
+ import 'node:https';
25
36
  import 'worker_threads';
26
37
  import 'readline';
38
+ import 'node:child_process';
39
+ import 'node:zlib';
27
40
 
28
41
  // This file will be built for both ESM and CJS. Avoid relying on other modules as possible.
29
42
  const cssLangs = `\\.(css|less|sass|scss|styl|stylus|pcss|postcss)($|\\?)`;
@@ -2,30 +2,39 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var path$3 = require('path');
6
- var url = require('url');
7
- var fs$1 = require('fs');
8
- var os$1 = require('os');
9
- var require$$1 = require('util');
10
- var module$1 = require('module');
5
+ var path$3 = require('node:path');
6
+ var node_url = require('node:url');
7
+ var esbuild = require('esbuild');
8
+ var rollup = require('rollup');
9
+ var fs$1 = require('node:fs');
10
+ var os$1 = require('node:os');
11
+ var node_util = require('node:util');
12
+ var node_module = require('node:module');
11
13
  var require$$0 = require('tty');
12
- var require$$0$1 = require('crypto');
14
+ var require$$1 = require('util');
15
+ var require$$0$1 = require('path');
16
+ var require$$0$2 = require('crypto');
17
+ var require$$1$1 = require('fs');
13
18
  var readline = require('readline');
19
+ var require$$2 = require('os');
14
20
 
15
21
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
16
22
 
17
23
  var path__default = /*#__PURE__*/_interopDefaultLegacy(path$3);
18
24
  var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs$1);
19
25
  var os__default = /*#__PURE__*/_interopDefaultLegacy(os$1);
20
- var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1);
21
26
  var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
27
+ var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1);
22
28
  var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$1);
29
+ var require$$0__default$2 = /*#__PURE__*/_interopDefaultLegacy(require$$0$2);
30
+ var require$$1__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$1$1);
23
31
  var readline__default = /*#__PURE__*/_interopDefaultLegacy(readline);
32
+ var require$$2__default = /*#__PURE__*/_interopDefaultLegacy(require$$2);
24
33
 
25
- var version = "3.0.0-alpha.13";
34
+ var version = "3.0.0-alpha.14";
26
35
 
27
36
  const VERSION = version;
28
- const VITE_PACKAGE_DIR = path$3.resolve(url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href))), '../../..');
37
+ const VITE_PACKAGE_DIR = path$3.resolve(node_url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href))), '../../..');
29
38
  const CLIENT_ENTRY = path$3.resolve(VITE_PACKAGE_DIR, 'dist/client/client.mjs');
30
39
  path$3.resolve(VITE_PACKAGE_DIR, 'dist/client/env.mjs');
31
40
  path__default.dirname(CLIENT_ENTRY);
@@ -1203,7 +1212,7 @@ var debug = src.exports;
1203
1212
 
1204
1213
  var utils$3 = {};
1205
1214
 
1206
- const path$2 = path__default;
1215
+ const path$2 = require$$0__default$1;
1207
1216
  const WIN_SLASH = '\\\\/';
1208
1217
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
1209
1218
 
@@ -1383,7 +1392,7 @@ var constants$2 = {
1383
1392
 
1384
1393
  (function (exports) {
1385
1394
 
1386
- const path = path__default;
1395
+ const path = require$$0__default$1;
1387
1396
  const win32 = process.platform === 'win32';
1388
1397
  const {
1389
1398
  REGEX_BACKSLASH,
@@ -2920,7 +2929,7 @@ parse$2.fastpaths = (input, options) => {
2920
2929
 
2921
2930
  var parse_1 = parse$2;
2922
2931
 
2923
- const path$1 = path__default;
2932
+ const path$1 = require$$0__default$1;
2924
2933
  const scan = scan_1;
2925
2934
  const parse$1 = parse_1;
2926
2935
  const utils = utils$3;
@@ -3276,22 +3285,22 @@ function ensureArray(thing) {
3276
3285
  }
3277
3286
 
3278
3287
  const normalizePath$1 = function normalizePath(filename) {
3279
- return filename.split(path$3.win32.sep).join(path$3.posix.sep);
3288
+ return filename.split(require$$0$1.win32.sep).join(require$$0$1.posix.sep);
3280
3289
  };
3281
3290
 
3282
3291
  function getMatcherString(id, resolutionBase) {
3283
- if (resolutionBase === false || path$3.isAbsolute(id) || id.startsWith('*')) {
3292
+ if (resolutionBase === false || require$$0$1.isAbsolute(id) || id.startsWith('*')) {
3284
3293
  return normalizePath$1(id);
3285
3294
  }
3286
3295
  // resolve('') is valid and will default to process.cwd()
3287
- const basePath = normalizePath$1(path$3.resolve(resolutionBase || ''))
3296
+ const basePath = normalizePath$1(require$$0$1.resolve(resolutionBase || ''))
3288
3297
  // escape all possible (posix + win) path characters that might interfere with regex
3289
3298
  .replace(/[-^$*+?.()|[\]{}]/g, '\\$&');
3290
3299
  // Note that we use posix.join because:
3291
3300
  // 1. the basePath has been normalized to use /
3292
3301
  // 2. the incoming glob (id) matcher, also uses /
3293
3302
  // otherwise Node will force backslash (\) on windows
3294
- return path$3.posix.join(basePath, normalizePath$1(id));
3303
+ return require$$0$1.posix.join(basePath, normalizePath$1(id));
3295
3304
  }
3296
3305
  const createFilter$1 = function createFilter(include, exclude, options) {
3297
3306
  const resolutionBase = options && options.resolve;
@@ -3338,7 +3347,7 @@ function slash(p) {
3338
3347
  return p.replace(/\\/g, '/');
3339
3348
  }
3340
3349
  // TODO: use import()
3341
- const _require = module$1.createRequire((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href)));
3350
+ const _require = node_module.createRequire((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href)));
3342
3351
  try {
3343
3352
  Boolean(_require('pnpapi'));
3344
3353
  }
@@ -3407,11 +3416,11 @@ function isFileReadable(filename) {
3407
3416
  }
3408
3417
  }
3409
3418
  isWindows
3410
- ? require$$1.promisify(gracefulRemoveDir)
3419
+ ? node_util.promisify(gracefulRemoveDir)
3411
3420
  : function removeDirSync(dir) {
3412
3421
  fs__default.rmSync(dir, { recursive: true, force: true });
3413
3422
  };
3414
- isWindows ? require$$1.promisify(gracefulRename) : fs__default.renameSync;
3423
+ isWindows ? node_util.promisify(gracefulRename) : fs__default.renameSync;
3415
3424
  function arraify(target) {
3416
3425
  return Array.isArray(target) ? target : [target];
3417
3426
  }
@@ -3585,8 +3594,8 @@ var etag_1 = etag;
3585
3594
  * @private
3586
3595
  */
3587
3596
 
3588
- var crypto = require$$0__default$1;
3589
- var Stats = fs__default.Stats;
3597
+ var crypto = require$$0__default$2;
3598
+ var Stats = require$$1__default$1.Stats;
3590
3599
 
3591
3600
  /**
3592
3601
  * Module variables.
@@ -3913,9 +3922,9 @@ function searchForWorkspaceRoot(current, root = searchForPackageRoot(current)) {
3913
3922
 
3914
3923
  var main$1 = {exports: {}};
3915
3924
 
3916
- const fs = fs__default;
3917
- const path = path__default;
3918
- const os = os__default;
3925
+ const fs = require$$1__default$1;
3926
+ const path = require$$0__default$1;
3927
+ const os = require$$2__default;
3919
3928
 
3920
3929
  function log (message) {
3921
3930
  console.log(`[dotenv][DEBUG] ${message}`);
@@ -4160,6 +4169,8 @@ function resolveEnvPrefix({ envPrefix = 'VITE_' }) {
4160
4169
  return envPrefix;
4161
4170
  }
4162
4171
 
4172
+ exports.esbuildVersion = esbuild.version;
4173
+ exports.rollupVersion = rollup.VERSION;
4163
4174
  exports.createFilter = createFilter;
4164
4175
  exports.createLogger = createLogger;
4165
4176
  exports.loadEnv = loadEnv;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "3.0.0-alpha.13",
3
+ "version": "3.0.0-alpha.14",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -31,7 +31,7 @@
31
31
  "types"
32
32
  ],
33
33
  "engines": {
34
- "node": ">=14.6.0"
34
+ "node": ">=14.18.0"
35
35
  },
36
36
  "repository": {
37
37
  "type": "git",
@@ -59,7 +59,7 @@
59
59
  "dependencies": {
60
60
  "esbuild": "^0.14.43",
61
61
  "postcss": "^8.4.14",
62
- "resolve": "^1.22.0",
62
+ "resolve": "^1.22.1",
63
63
  "rollup": "^2.75.6"
64
64
  },
65
65
  "optionalDependencies": {
@@ -99,6 +99,7 @@
99
99
  "launch-editor-middleware": "^2.4.0",
100
100
  "magic-string": "^0.26.2",
101
101
  "micromatch": "^4.0.5",
102
+ "mlly": "^0.5.3",
102
103
  "mrmime": "^1.0.1",
103
104
  "node-forge": "^1.3.1",
104
105
  "okie": "^1.0.1",
@@ -114,7 +115,7 @@
114
115
  "source-map-js": "^1.0.2",
115
116
  "source-map-support": "^0.5.21",
116
117
  "strip-ansi": "^7.0.1",
117
- "strip-literal": "^0.3.0",
118
+ "strip-literal": "^0.4.0",
118
119
  "tsconfck": "^2.0.1",
119
120
  "tslib": "^2.4.0",
120
121
  "types": "link:./types",