vite 4.1.0-beta.0 → 4.1.0-beta.2
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.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
- package/LICENSE.md +13 -12
- package/dist/client/client.mjs +15 -1
- package/dist/client/client.mjs.map +1 -1
- package/dist/client/env.mjs.map +1 -1
- package/dist/node/chunks/{dep-31fe3c68.js → dep-98d07f71.js} +7 -7
- package/dist/node/chunks/dep-ace95160.js +43 -0
- package/dist/node/chunks/{dep-5a9137b7.js → dep-b6b8dfbf.js} +725 -609
- package/dist/node/chunks/{dep-41ca0ecb.js → dep-f597f42f.js} +3 -3
- package/dist/node/cli.js +10 -5
- package/dist/node/constants.js +3 -1
- package/dist/node/index.d.ts +18 -4
- package/dist/node/index.js +6 -1
- package/dist/node-cjs/publicUtils.cjs +2 -2
- package/index.cjs +1 -1
- package/package.json +23 -16
- package/types/metadata.d.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import require$$0__default from 'fs';
|
|
2
2
|
import require$$0 from 'postcss';
|
|
3
|
-
import {
|
|
3
|
+
import { c as commonjsGlobal } from './dep-ace95160.js';
|
|
4
4
|
import require$$0$1 from 'path';
|
|
5
5
|
import require$$5 from 'crypto';
|
|
6
6
|
import require$$0$2 from 'util';
|
|
@@ -7669,8 +7669,8 @@ var postcss = buildExports.postcss = true;
|
|
|
7669
7669
|
|
|
7670
7670
|
var index = /*#__PURE__*/_mergeNamespaces({
|
|
7671
7671
|
__proto__: null,
|
|
7672
|
-
|
|
7673
|
-
|
|
7672
|
+
get default () { return buildExports; },
|
|
7673
|
+
postcss: postcss
|
|
7674
7674
|
}, [buildExports]);
|
|
7675
7675
|
|
|
7676
7676
|
export { index as i };
|
package/dist/node/cli.js
CHANGED
|
@@ -2,13 +2,14 @@ import path from 'node:path';
|
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import { performance } from 'node:perf_hooks';
|
|
4
4
|
import { EventEmitter } from 'events';
|
|
5
|
-
import { A as picocolorsExports, B as bindShortcuts, w as createLogger, h as resolveConfig } from './chunks/dep-
|
|
5
|
+
import { A as picocolorsExports, B as bindShortcuts, w as createLogger, h as resolveConfig } from './chunks/dep-b6b8dfbf.js';
|
|
6
6
|
import { VERSION } from './constants.js';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import 'node:module';
|
|
9
9
|
import 'tty';
|
|
10
10
|
import 'esbuild';
|
|
11
11
|
import 'path';
|
|
12
|
+
import './chunks/dep-ace95160.js';
|
|
12
13
|
import 'fs';
|
|
13
14
|
import 'assert';
|
|
14
15
|
import 'util';
|
|
@@ -26,8 +27,12 @@ import 'resolve';
|
|
|
26
27
|
import 'crypto';
|
|
27
28
|
import 'node:buffer';
|
|
28
29
|
import 'module';
|
|
30
|
+
import 'node:assert';
|
|
31
|
+
import 'node:process';
|
|
32
|
+
import 'node:v8';
|
|
29
33
|
import 'worker_threads';
|
|
30
34
|
import 'zlib';
|
|
35
|
+
import 'buffer';
|
|
31
36
|
import 'https';
|
|
32
37
|
import 'tls';
|
|
33
38
|
import 'node:http';
|
|
@@ -724,7 +729,7 @@ cli
|
|
|
724
729
|
filterDuplicateOptions(options);
|
|
725
730
|
// output structure is preserved even after bundling so require()
|
|
726
731
|
// is ok here
|
|
727
|
-
const { createServer } = await import('./chunks/dep-
|
|
732
|
+
const { createServer } = await import('./chunks/dep-b6b8dfbf.js').then(function (n) { return n.E; });
|
|
728
733
|
try {
|
|
729
734
|
const server = await createServer({
|
|
730
735
|
root,
|
|
@@ -802,7 +807,7 @@ cli
|
|
|
802
807
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
803
808
|
.action(async (root, options) => {
|
|
804
809
|
filterDuplicateOptions(options);
|
|
805
|
-
const { build } = await import('./chunks/dep-
|
|
810
|
+
const { build } = await import('./chunks/dep-b6b8dfbf.js').then(function (n) { return n.D; });
|
|
806
811
|
const buildOptions = cleanOptions(options);
|
|
807
812
|
try {
|
|
808
813
|
await build({
|
|
@@ -830,7 +835,7 @@ cli
|
|
|
830
835
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
831
836
|
.action(async (root, options) => {
|
|
832
837
|
filterDuplicateOptions(options);
|
|
833
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
|
838
|
+
const { optimizeDeps } = await import('./chunks/dep-b6b8dfbf.js').then(function (n) { return n.C; });
|
|
834
839
|
try {
|
|
835
840
|
const config = await resolveConfig({
|
|
836
841
|
root,
|
|
@@ -855,7 +860,7 @@ cli
|
|
|
855
860
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
|
856
861
|
.action(async (root, options) => {
|
|
857
862
|
filterDuplicateOptions(options);
|
|
858
|
-
const { preview } = await import('./chunks/dep-
|
|
863
|
+
const { preview } = await import('./chunks/dep-b6b8dfbf.js').then(function (n) { return n.F; });
|
|
859
864
|
try {
|
|
860
865
|
const server = await preview({
|
|
861
866
|
root,
|
package/dist/node/constants.js
CHANGED
|
@@ -117,5 +117,7 @@ const wildcardHosts = new Set([
|
|
|
117
117
|
'::',
|
|
118
118
|
'0000:0000:0000:0000:0000:0000:0000:0000',
|
|
119
119
|
]);
|
|
120
|
+
const DEFAULT_DEV_PORT = 5173;
|
|
121
|
+
const DEFAULT_PREVIEW_PORT = 4173;
|
|
120
122
|
|
|
121
|
-
export { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_RE, DEFAULT_CONFIG_FILES, DEFAULT_EXTENSIONS, DEFAULT_MAIN_FIELDS, DEP_VERSION_RE, ENV_ENTRY, ENV_PUBLIC_PATH, ESBUILD_MODULES_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, NULL_BYTE_PLACEHOLDER, OPTIMIZABLE_ENTRY_RE, SPECIAL_QUERY_RE, VALID_ID_PREFIX, VERSION, VITE_PACKAGE_DIR, loopbackHosts, wildcardHosts };
|
|
123
|
+
export { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_RE, DEFAULT_CONFIG_FILES, DEFAULT_DEV_PORT, DEFAULT_EXTENSIONS, DEFAULT_MAIN_FIELDS, DEFAULT_PREVIEW_PORT, DEP_VERSION_RE, ENV_ENTRY, ENV_PUBLIC_PATH, ESBUILD_MODULES_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, NULL_BYTE_PLACEHOLDER, OPTIMIZABLE_ENTRY_RE, SPECIAL_QUERY_RE, VALID_ID_PREFIX, VERSION, VITE_PACKAGE_DIR, loopbackHosts, wildcardHosts };
|
package/dist/node/index.d.ts
CHANGED
|
@@ -213,7 +213,7 @@ export declare interface BuildOptions {
|
|
|
213
213
|
terserOptions?: Terser.MinifyOptions;
|
|
214
214
|
/**
|
|
215
215
|
* Will be merged with internal rollup options.
|
|
216
|
-
* https://rollupjs.org/
|
|
216
|
+
* https://rollupjs.org/configuration-options/
|
|
217
217
|
*/
|
|
218
218
|
rollupOptions?: RollupOptions;
|
|
219
219
|
/**
|
|
@@ -276,6 +276,12 @@ export declare interface BuildOptions {
|
|
|
276
276
|
* directives in production.
|
|
277
277
|
*/
|
|
278
278
|
ssrManifest?: boolean | string;
|
|
279
|
+
/**
|
|
280
|
+
* Emit assets during SSR.
|
|
281
|
+
* @experimental
|
|
282
|
+
* @default false
|
|
283
|
+
*/
|
|
284
|
+
ssrEmitAssets?: boolean;
|
|
279
285
|
/**
|
|
280
286
|
* Set to false to disable reporting compressed chunk sizes.
|
|
281
287
|
* Can slightly improve build speed.
|
|
@@ -288,7 +294,7 @@ export declare interface BuildOptions {
|
|
|
288
294
|
chunkSizeWarningLimit?: number;
|
|
289
295
|
/**
|
|
290
296
|
* Rollup watch options
|
|
291
|
-
* https://rollupjs.org/
|
|
297
|
+
* https://rollupjs.org/configuration-options/#watch
|
|
292
298
|
*/
|
|
293
299
|
watch?: WatcherOptions | null;
|
|
294
300
|
}
|
|
@@ -703,6 +709,14 @@ export declare interface ExperimentalOptions {
|
|
|
703
709
|
* @default false
|
|
704
710
|
*/
|
|
705
711
|
hmrPartialAccept?: boolean;
|
|
712
|
+
/**
|
|
713
|
+
* Skips SSR transform to make it easier to use Vite with Node ESM loaders.
|
|
714
|
+
* @warning Enabling this will break normal operation of Vite's SSR in development mode.
|
|
715
|
+
*
|
|
716
|
+
* @experimental
|
|
717
|
+
* @default false
|
|
718
|
+
*/
|
|
719
|
+
skipSsrTransform?: boolean;
|
|
706
720
|
}
|
|
707
721
|
|
|
708
722
|
export declare type ExportsData = {
|
|
@@ -2435,7 +2449,7 @@ export declare interface UserConfig {
|
|
|
2435
2449
|
legacy?: LegacyOptions;
|
|
2436
2450
|
/**
|
|
2437
2451
|
* Log level.
|
|
2438
|
-
*
|
|
2452
|
+
* @default 'info'
|
|
2439
2453
|
*/
|
|
2440
2454
|
logLevel?: LogLevel;
|
|
2441
2455
|
/**
|
|
@@ -2443,7 +2457,7 @@ export declare interface UserConfig {
|
|
|
2443
2457
|
*/
|
|
2444
2458
|
customLogger?: Logger;
|
|
2445
2459
|
/**
|
|
2446
|
-
*
|
|
2460
|
+
* @default true
|
|
2447
2461
|
*/
|
|
2448
2462
|
clearScreen?: boolean;
|
|
2449
2463
|
/**
|
package/dist/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as build, e as buildErrorMessage, u as createFilter, w as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, j as getDepOptimizationConfig, k as isDepsOptimizerEnabled, l as loadConfigFromFile, y as loadEnv, q as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, i as resolveBaseUrl, h as resolveConfig, z as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, x as searchForWorkspaceRoot, v as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
|
1
|
+
export { b as build, e as buildErrorMessage, u as createFilter, w as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, j as getDepOptimizationConfig, k as isDepsOptimizerEnabled, l as loadConfigFromFile, y as loadEnv, q as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, i as resolveBaseUrl, h as resolveConfig, z as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, x as searchForWorkspaceRoot, v as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-b6b8dfbf.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';
|
|
@@ -9,6 +9,7 @@ import 'node:perf_hooks';
|
|
|
9
9
|
import 'node:module';
|
|
10
10
|
import 'tty';
|
|
11
11
|
import 'path';
|
|
12
|
+
import './chunks/dep-ace95160.js';
|
|
12
13
|
import 'fs';
|
|
13
14
|
import 'events';
|
|
14
15
|
import 'assert';
|
|
@@ -27,8 +28,12 @@ import 'resolve';
|
|
|
27
28
|
import 'crypto';
|
|
28
29
|
import 'node:buffer';
|
|
29
30
|
import 'module';
|
|
31
|
+
import 'node:assert';
|
|
32
|
+
import 'node:process';
|
|
33
|
+
import 'node:v8';
|
|
30
34
|
import 'worker_threads';
|
|
31
35
|
import 'zlib';
|
|
36
|
+
import 'buffer';
|
|
32
37
|
import 'https';
|
|
33
38
|
import 'tls';
|
|
34
39
|
import 'node:http';
|
|
@@ -3786,10 +3786,10 @@ function getCodeWithSourcemap(type, code, map) {
|
|
|
3786
3786
|
code += `\n/*${JSON.stringify(map, null, 2).replace(/\*\//g, '*\\/')}*/\n`;
|
|
3787
3787
|
}
|
|
3788
3788
|
if (type === 'js') {
|
|
3789
|
-
code += `\n//# sourceMappingURL=${genSourceMapUrl(map
|
|
3789
|
+
code += `\n//# sourceMappingURL=${genSourceMapUrl(map)}`;
|
|
3790
3790
|
}
|
|
3791
3791
|
else if (type === 'css') {
|
|
3792
|
-
code += `\n/*# sourceMappingURL=${genSourceMapUrl(map
|
|
3792
|
+
code += `\n/*# sourceMappingURL=${genSourceMapUrl(map)} */`;
|
|
3793
3793
|
}
|
|
3794
3794
|
return code;
|
|
3795
3795
|
}
|
package/index.cjs
CHANGED
|
@@ -28,7 +28,7 @@ const unsupportedCJS = ['resolvePackageEntry', 'resolvePackageData']
|
|
|
28
28
|
unsupportedCJS.forEach((name) => {
|
|
29
29
|
module.exports[name] = () => {
|
|
30
30
|
throw new Error(
|
|
31
|
-
`"${name}" is not supported in CJS build of Vite
|
|
31
|
+
`"${name}" is not supported in CJS build of Vite 4.\nPlease use ESM or dynamic imports \`const { ${name} } = await import('vite')\`.`,
|
|
32
32
|
)
|
|
33
33
|
}
|
|
34
34
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "4.1.0-beta.
|
|
3
|
+
"version": "4.1.0-beta.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -8,8 +8,15 @@
|
|
|
8
8
|
"bin": {
|
|
9
9
|
"vite": "bin/vite.js"
|
|
10
10
|
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"frontend",
|
|
13
|
+
"framework",
|
|
14
|
+
"hmr",
|
|
15
|
+
"dev-server",
|
|
16
|
+
"build-tool",
|
|
17
|
+
"vite"
|
|
18
|
+
],
|
|
11
19
|
"main": "./dist/node/index.js",
|
|
12
|
-
"module": "./dist/node/index.js",
|
|
13
20
|
"types": "./dist/node/index.d.ts",
|
|
14
21
|
"exports": {
|
|
15
22
|
".": {
|
|
@@ -60,26 +67,26 @@
|
|
|
60
67
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
|
61
68
|
"dependencies": {
|
|
62
69
|
"esbuild": "^0.16.14",
|
|
63
|
-
"postcss": "^8.4.
|
|
70
|
+
"postcss": "^8.4.21",
|
|
64
71
|
"resolve": "^1.22.1",
|
|
65
|
-
"rollup": "^3.
|
|
72
|
+
"rollup": "^3.10.0"
|
|
66
73
|
},
|
|
67
74
|
"optionalDependencies": {
|
|
68
75
|
"fsevents": "~2.3.2"
|
|
69
76
|
},
|
|
70
77
|
"devDependencies": {
|
|
71
78
|
"@ampproject/remapping": "^2.2.0",
|
|
72
|
-
"@babel/parser": "^7.20.
|
|
79
|
+
"@babel/parser": "^7.20.13",
|
|
73
80
|
"@babel/types": "^7.20.7",
|
|
74
81
|
"@jridgewell/trace-mapping": "^0.3.17",
|
|
75
|
-
"@rollup/plugin-alias": "^4.0.
|
|
76
|
-
"@rollup/plugin-commonjs": "^24.0.
|
|
77
|
-
"@rollup/plugin-dynamic-import-vars": "^2.0.
|
|
82
|
+
"@rollup/plugin-alias": "^4.0.3",
|
|
83
|
+
"@rollup/plugin-commonjs": "^24.0.1",
|
|
84
|
+
"@rollup/plugin-dynamic-import-vars": "^2.0.3",
|
|
78
85
|
"@rollup/plugin-json": "^6.0.0",
|
|
79
86
|
"@rollup/plugin-node-resolve": "15.0.1",
|
|
80
|
-
"@rollup/plugin-typescript": "^
|
|
87
|
+
"@rollup/plugin-typescript": "^11.0.0",
|
|
81
88
|
"@rollup/pluginutils": "^5.0.2",
|
|
82
|
-
"acorn": "^8.8.
|
|
89
|
+
"acorn": "^8.8.2",
|
|
83
90
|
"acorn-walk": "^8.2.0",
|
|
84
91
|
"cac": "^6.7.14",
|
|
85
92
|
"chokidar": "^3.5.3",
|
|
@@ -93,7 +100,7 @@
|
|
|
93
100
|
"dotenv": "^16.0.3",
|
|
94
101
|
"dotenv-expand": "^9.0.0",
|
|
95
102
|
"es-module-lexer": "^1.1.0",
|
|
96
|
-
"estree-walker": "^3.0.
|
|
103
|
+
"estree-walker": "^3.0.3",
|
|
97
104
|
"etag": "^1.8.1",
|
|
98
105
|
"fast-glob": "^3.2.12",
|
|
99
106
|
"http-proxy": "^1.18.1",
|
|
@@ -101,18 +108,18 @@
|
|
|
101
108
|
"launch-editor-middleware": "^2.6.0",
|
|
102
109
|
"magic-string": "^0.27.0",
|
|
103
110
|
"micromatch": "^4.0.5",
|
|
104
|
-
"mlly": "^1.
|
|
111
|
+
"mlly": "^1.1.0",
|
|
105
112
|
"mrmime": "^1.0.1",
|
|
106
113
|
"okie": "^1.0.1",
|
|
107
114
|
"open": "^8.4.0",
|
|
108
115
|
"parse5": "^7.1.2",
|
|
109
|
-
"periscopic": "^3.0
|
|
116
|
+
"periscopic": "^3.1.0",
|
|
110
117
|
"picocolors": "^1.0.0",
|
|
111
118
|
"picomatch": "^2.3.1",
|
|
112
119
|
"postcss-import": "^15.1.0",
|
|
113
120
|
"postcss-load-config": "^4.0.1",
|
|
114
121
|
"postcss-modules": "^6.0.0",
|
|
115
|
-
"resolve.exports": "^
|
|
122
|
+
"resolve.exports": "^2.0.0",
|
|
116
123
|
"rollup-plugin-license": "^3.0.1",
|
|
117
124
|
"sirv": "^2.0.2",
|
|
118
125
|
"source-map-js": "^1.0.2",
|
|
@@ -120,10 +127,10 @@
|
|
|
120
127
|
"strip-ansi": "^7.0.1",
|
|
121
128
|
"strip-literal": "^0.4.2",
|
|
122
129
|
"tsconfck": "^2.0.2",
|
|
123
|
-
"tslib": "^2.
|
|
130
|
+
"tslib": "^2.5.0",
|
|
124
131
|
"types": "link:./types",
|
|
125
132
|
"ufo": "^1.0.1",
|
|
126
|
-
"ws": "^8.
|
|
133
|
+
"ws": "^8.12.0"
|
|
127
134
|
},
|
|
128
135
|
"peerDependencies": {
|
|
129
136
|
"@types/node": ">= 14",
|