vite 4.1.4 → 4.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.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
- package/dist/client/client.mjs +20 -31
- package/dist/client/client.mjs.map +1 -1
- package/dist/client/env.mjs.map +1 -1
- package/dist/node/chunks/{dep-ca21228b.js → dep-a18b8a7b.js} +11081 -9576
- package/dist/node/chunks/{dep-f597f42f.js → dep-d2a7fe01.js} +1 -1
- package/dist/node/cli.js +8 -8
- package/dist/node/index.d.ts +18 -1
- package/dist/node/index.js +3 -3
- package/dist/node-cjs/publicUtils.cjs +3 -3
- package/package.json +13 -13
- package/dist/node/chunks/dep-ace95160.js +0 -43
|
@@ -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-a18b8a7b.js';
|
|
4
4
|
import require$$0$1 from 'path';
|
|
5
5
|
import require$$5 from 'crypto';
|
|
6
6
|
import require$$0$2 from 'util';
|
package/dist/node/cli.js
CHANGED
|
@@ -2,14 +2,13 @@ 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-a18b8a7b.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';
|
|
13
12
|
import 'fs';
|
|
14
13
|
import 'assert';
|
|
15
14
|
import 'util';
|
|
@@ -26,6 +25,7 @@ import 'node:dns';
|
|
|
26
25
|
import 'resolve';
|
|
27
26
|
import 'crypto';
|
|
28
27
|
import 'node:buffer';
|
|
28
|
+
import 'node:fs/promises';
|
|
29
29
|
import 'module';
|
|
30
30
|
import 'node:assert';
|
|
31
31
|
import 'node:process';
|
|
@@ -39,8 +39,8 @@ import 'node:http';
|
|
|
39
39
|
import 'node:https';
|
|
40
40
|
import 'rollup';
|
|
41
41
|
import 'querystring';
|
|
42
|
-
import 'node:child_process';
|
|
43
42
|
import 'node:readline';
|
|
43
|
+
import 'node:child_process';
|
|
44
44
|
import 'node:zlib';
|
|
45
45
|
|
|
46
46
|
function toArr(any) {
|
|
@@ -729,7 +729,7 @@ cli
|
|
|
729
729
|
filterDuplicateOptions(options);
|
|
730
730
|
// output structure is preserved even after bundling so require()
|
|
731
731
|
// is ok here
|
|
732
|
-
const { createServer } = await import('./chunks/dep-
|
|
732
|
+
const { createServer } = await import('./chunks/dep-a18b8a7b.js').then(function (n) { return n.F; });
|
|
733
733
|
try {
|
|
734
734
|
const server = await createServer({
|
|
735
735
|
root,
|
|
@@ -797,7 +797,7 @@ cli
|
|
|
797
797
|
.option('--assetsDir <dir>', `[string] directory under outDir to place assets in (default: assets)`)
|
|
798
798
|
.option('--assetsInlineLimit <number>', `[number] static asset base64 inline threshold in bytes (default: 4096)`)
|
|
799
799
|
.option('--ssr [entry]', `[string] build specified entry for server-side rendering`)
|
|
800
|
-
.option('--sourcemap', `[boolean] output source maps for build (default: false)`)
|
|
800
|
+
.option('--sourcemap [output]', `[boolean | "inline" | "hidden"] output source maps for build (default: false)`)
|
|
801
801
|
.option('--minify [minifier]', `[boolean | "terser" | "esbuild"] enable/disable minification, ` +
|
|
802
802
|
`or specify minifier to use (default: esbuild)`)
|
|
803
803
|
.option('--manifest [name]', `[boolean | string] emit build manifest json`)
|
|
@@ -807,7 +807,7 @@ cli
|
|
|
807
807
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
808
808
|
.action(async (root, options) => {
|
|
809
809
|
filterDuplicateOptions(options);
|
|
810
|
-
const { build } = await import('./chunks/dep-
|
|
810
|
+
const { build } = await import('./chunks/dep-a18b8a7b.js').then(function (n) { return n.E; });
|
|
811
811
|
const buildOptions = cleanOptions(options);
|
|
812
812
|
try {
|
|
813
813
|
await build({
|
|
@@ -835,7 +835,7 @@ cli
|
|
|
835
835
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
836
836
|
.action(async (root, options) => {
|
|
837
837
|
filterDuplicateOptions(options);
|
|
838
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
|
838
|
+
const { optimizeDeps } = await import('./chunks/dep-a18b8a7b.js').then(function (n) { return n.D; });
|
|
839
839
|
try {
|
|
840
840
|
const config = await resolveConfig({
|
|
841
841
|
root,
|
|
@@ -860,7 +860,7 @@ cli
|
|
|
860
860
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
|
861
861
|
.action(async (root, options) => {
|
|
862
862
|
filterDuplicateOptions(options);
|
|
863
|
-
const { preview } = await import('./chunks/dep-
|
|
863
|
+
const { preview } = await import('./chunks/dep-a18b8a7b.js').then(function (n) { return n.G; });
|
|
864
864
|
try {
|
|
865
865
|
const server = await preview({
|
|
866
866
|
root,
|
package/dist/node/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { version as esbuildVersion } from 'esbuild';
|
|
|
17
17
|
import { EventEmitter } from 'node:events';
|
|
18
18
|
import * as events from 'node:events';
|
|
19
19
|
import type { ExistingRawSourceMap } from 'rollup';
|
|
20
|
+
import type { Exports } from 'resolve.exports';
|
|
20
21
|
import type * as fs from 'node:fs';
|
|
21
22
|
import { FullReloadPayload } from "../../types/hmrPayload";
|
|
22
23
|
import { GeneralImportGlobOptions } from "../../types/importGlob";
|
|
@@ -26,6 +27,7 @@ import * as http from 'node:http';
|
|
|
26
27
|
import { ImportGlobEagerFunction } from "../../types/importGlob";
|
|
27
28
|
import { ImportGlobFunction } from "../../types/importGlob";
|
|
28
29
|
import { ImportGlobOptions } from "../../types/importGlob";
|
|
30
|
+
import type { Imports } from 'resolve.exports';
|
|
29
31
|
import type { IncomingMessage } from 'node:http';
|
|
30
32
|
import { InferCustomEventPayload } from "../../types/customEvent";
|
|
31
33
|
import type { InputOption } from 'rollup';
|
|
@@ -1418,7 +1420,8 @@ export declare interface PackageData {
|
|
|
1418
1420
|
main: string;
|
|
1419
1421
|
module: string;
|
|
1420
1422
|
browser: string | Record<string, string | false>;
|
|
1421
|
-
exports:
|
|
1423
|
+
exports: Exports;
|
|
1424
|
+
imports: Imports;
|
|
1422
1425
|
dependencies: Record<string, string>;
|
|
1423
1426
|
};
|
|
1424
1427
|
}
|
|
@@ -1701,6 +1704,7 @@ export declare interface ResolvedPreviewOptions extends PreviewOptions {
|
|
|
1701
1704
|
export declare interface ResolvedServerOptions extends ServerOptions {
|
|
1702
1705
|
fs: Required<FileSystemServeOptions>;
|
|
1703
1706
|
middlewareMode: boolean;
|
|
1707
|
+
sourcemapIgnoreList: Exclude<ServerOptions['sourcemapIgnoreList'], false | undefined>;
|
|
1704
1708
|
}
|
|
1705
1709
|
|
|
1706
1710
|
export declare interface ResolvedServerUrls {
|
|
@@ -2070,6 +2074,15 @@ export declare interface ServerOptions extends CommonServerOptions {
|
|
|
2070
2074
|
* @default true
|
|
2071
2075
|
*/
|
|
2072
2076
|
preTransformRequests?: boolean;
|
|
2077
|
+
/**
|
|
2078
|
+
* Whether or not to ignore-list source files in the dev server sourcemap, used to populate
|
|
2079
|
+
* the [`x_google_ignoreList` source map extension](https://developer.chrome.com/blog/devtools-better-angular-debugging/#the-x_google_ignorelist-source-map-extension).
|
|
2080
|
+
*
|
|
2081
|
+
* By default, it excludes all paths containing `node_modules`. You can pass `false` to
|
|
2082
|
+
* disable this behavior, or, for full control, a function that takes the source path and
|
|
2083
|
+
* sourcemap path and returns whether to ignore the source path.
|
|
2084
|
+
*/
|
|
2085
|
+
sourcemapIgnoreList?: false | ((sourcePath: string, sourcemapPath: string) => boolean);
|
|
2073
2086
|
/**
|
|
2074
2087
|
* Force dep pre-optimization regardless of whether deps have changed.
|
|
2075
2088
|
*
|
|
@@ -2614,6 +2627,10 @@ export declare interface ViteDevServer {
|
|
|
2614
2627
|
* @param forceOptimize - force the optimizer to re-bundle, same as --force cli flag
|
|
2615
2628
|
*/
|
|
2616
2629
|
restart(forceOptimize?: boolean): Promise<void>;
|
|
2630
|
+
/**
|
|
2631
|
+
* Open browser
|
|
2632
|
+
*/
|
|
2633
|
+
openBrowser(): void;
|
|
2617
2634
|
/* Excluded from this release type: _importGlobMap */
|
|
2618
2635
|
/* Excluded from this release type: _ssrExternals */
|
|
2619
2636
|
/* Excluded from this release type: _restartPromise */
|
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-a18b8a7b.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,7 +9,6 @@ import 'node:perf_hooks';
|
|
|
9
9
|
import 'node:module';
|
|
10
10
|
import 'tty';
|
|
11
11
|
import 'path';
|
|
12
|
-
import './chunks/dep-ace95160.js';
|
|
13
12
|
import 'fs';
|
|
14
13
|
import 'events';
|
|
15
14
|
import 'assert';
|
|
@@ -27,6 +26,7 @@ import 'node:dns';
|
|
|
27
26
|
import 'resolve';
|
|
28
27
|
import 'crypto';
|
|
29
28
|
import 'node:buffer';
|
|
29
|
+
import 'node:fs/promises';
|
|
30
30
|
import 'module';
|
|
31
31
|
import 'node:assert';
|
|
32
32
|
import 'node:process';
|
|
@@ -39,8 +39,8 @@ import 'tls';
|
|
|
39
39
|
import 'node:http';
|
|
40
40
|
import 'node:https';
|
|
41
41
|
import 'querystring';
|
|
42
|
-
import 'node:child_process';
|
|
43
42
|
import 'node:readline';
|
|
43
|
+
import 'node:child_process';
|
|
44
44
|
import 'node:zlib';
|
|
45
45
|
|
|
46
46
|
// This file will be built for both ESM and CJS. Avoid relying on other modules as possible.
|
|
@@ -16,11 +16,11 @@ var require$$1$1 = require('fs');
|
|
|
16
16
|
var readline = require('node:readline');
|
|
17
17
|
var require$$2 = require('os');
|
|
18
18
|
|
|
19
|
-
const { version: version$2 } = JSON.parse(fs$1.readFileSync(new URL('../../package.json', (typeof document === 'undefined' ?
|
|
19
|
+
const { version: version$2 } = JSON.parse(fs$1.readFileSync(new URL('../../package.json', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href)))).toString());
|
|
20
20
|
const VERSION = version$2;
|
|
21
21
|
const VITE_PACKAGE_DIR = path$3.resolve(
|
|
22
22
|
// import.meta.url is `dist/node/constants.js` after bundle
|
|
23
|
-
node_url.fileURLToPath((typeof document === 'undefined' ?
|
|
23
|
+
node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href))), '../../..');
|
|
24
24
|
const CLIENT_ENTRY = path$3.resolve(VITE_PACKAGE_DIR, 'dist/client/client.mjs');
|
|
25
25
|
path$3.resolve(VITE_PACKAGE_DIR, 'dist/client/env.mjs');
|
|
26
26
|
path$3.dirname(CLIENT_ENTRY);
|
|
@@ -3408,7 +3408,7 @@ function slash(p) {
|
|
|
3408
3408
|
return p.replace(/\\/g, '/');
|
|
3409
3409
|
}
|
|
3410
3410
|
// TODO: use import()
|
|
3411
|
-
const _require = node_module.createRequire((typeof document === 'undefined' ?
|
|
3411
|
+
const _require = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href)));
|
|
3412
3412
|
try {
|
|
3413
3413
|
Boolean(_require('pnpapi'));
|
|
3414
3414
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "4.1
|
|
3
|
+
"version": "4.2.0-beta.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -66,18 +66,18 @@
|
|
|
66
66
|
},
|
|
67
67
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"esbuild": "^0.
|
|
69
|
+
"esbuild": "^0.17.5",
|
|
70
70
|
"postcss": "^8.4.21",
|
|
71
71
|
"resolve": "^1.22.1",
|
|
72
|
-
"rollup": "^3.
|
|
72
|
+
"rollup": "^3.18.0"
|
|
73
73
|
},
|
|
74
74
|
"optionalDependencies": {
|
|
75
75
|
"fsevents": "~2.3.2"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@ampproject/remapping": "^2.2.0",
|
|
79
|
-
"@babel/parser": "^7.
|
|
80
|
-
"@babel/types": "^7.
|
|
79
|
+
"@babel/parser": "^7.21.2",
|
|
80
|
+
"@babel/types": "^7.21.2",
|
|
81
81
|
"@jridgewell/trace-mapping": "^0.3.17",
|
|
82
82
|
"@rollup/plugin-alias": "^4.0.3",
|
|
83
83
|
"@rollup/plugin-commonjs": "^24.0.1",
|
|
@@ -99,19 +99,19 @@
|
|
|
99
99
|
"dep-types": "link:./src/types",
|
|
100
100
|
"dotenv": "^16.0.3",
|
|
101
101
|
"dotenv-expand": "^9.0.0",
|
|
102
|
-
"es-module-lexer": "^1.
|
|
102
|
+
"es-module-lexer": "^1.2.0",
|
|
103
103
|
"estree-walker": "^3.0.3",
|
|
104
104
|
"etag": "^1.8.1",
|
|
105
105
|
"fast-glob": "^3.2.12",
|
|
106
106
|
"http-proxy": "^1.18.1",
|
|
107
107
|
"json-stable-stringify": "^1.0.2",
|
|
108
108
|
"launch-editor-middleware": "^2.6.0",
|
|
109
|
-
"magic-string": "^0.
|
|
109
|
+
"magic-string": "^0.30.0",
|
|
110
110
|
"micromatch": "^4.0.5",
|
|
111
|
-
"mlly": "^1.1.
|
|
111
|
+
"mlly": "^1.1.1",
|
|
112
112
|
"mrmime": "^1.0.1",
|
|
113
113
|
"okie": "^1.0.1",
|
|
114
|
-
"open": "^8.4.
|
|
114
|
+
"open": "^8.4.2",
|
|
115
115
|
"parse5": "^7.1.2",
|
|
116
116
|
"periscopic": "^3.1.0",
|
|
117
117
|
"picocolors": "^1.0.0",
|
|
@@ -119,18 +119,18 @@
|
|
|
119
119
|
"postcss-import": "^15.1.0",
|
|
120
120
|
"postcss-load-config": "^4.0.1",
|
|
121
121
|
"postcss-modules": "^6.0.0",
|
|
122
|
-
"resolve.exports": "^2.0.
|
|
122
|
+
"resolve.exports": "^2.0.1",
|
|
123
123
|
"rollup-plugin-license": "^3.0.1",
|
|
124
124
|
"sirv": "^2.0.2",
|
|
125
125
|
"source-map-js": "^1.0.2",
|
|
126
126
|
"source-map-support": "^0.5.21",
|
|
127
127
|
"strip-ansi": "^7.0.1",
|
|
128
128
|
"strip-literal": "^1.0.1",
|
|
129
|
-
"tsconfck": "^2.0.
|
|
129
|
+
"tsconfck": "^2.0.3",
|
|
130
130
|
"tslib": "^2.5.0",
|
|
131
131
|
"types": "link:./types",
|
|
132
|
-
"ufo": "^1.0
|
|
133
|
-
"ws": "^8.12.
|
|
132
|
+
"ufo": "^1.1.0",
|
|
133
|
+
"ws": "^8.12.1"
|
|
134
134
|
},
|
|
135
135
|
"peerDependencies": {
|
|
136
136
|
"@types/node": ">= 14",
|
|
@@ -1,43 +0,0 @@
|
|
|
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
|
-
|
|
5
|
-
const __filename = __cjs_fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __cjs_dirname(__filename);
|
|
7
|
-
const require = __cjs_createRequire(import.meta.url);
|
|
8
|
-
const __require = require;
|
|
9
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
10
|
-
|
|
11
|
-
function getDefaultExportFromCjs (x) {
|
|
12
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function getAugmentedNamespace(n) {
|
|
16
|
-
if (n.__esModule) return n;
|
|
17
|
-
var f = n.default;
|
|
18
|
-
if (typeof f == "function") {
|
|
19
|
-
var a = function a () {
|
|
20
|
-
if (this instanceof a) {
|
|
21
|
-
var args = [null];
|
|
22
|
-
args.push.apply(args, arguments);
|
|
23
|
-
var Ctor = Function.bind.apply(f, args);
|
|
24
|
-
return new Ctor();
|
|
25
|
-
}
|
|
26
|
-
return f.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
a.prototype = f.prototype;
|
|
29
|
-
} else a = {};
|
|
30
|
-
Object.defineProperty(a, '__esModule', {value: true});
|
|
31
|
-
Object.keys(n).forEach(function (k) {
|
|
32
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
33
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
34
|
-
enumerable: true,
|
|
35
|
-
get: function () {
|
|
36
|
-
return n[k];
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
return a;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export { getAugmentedNamespace as a, commonjsGlobal as c, getDefaultExportFromCjs as g };
|