vite 8.2.0 → 8.2.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.
- package/LICENSE.md +1 -1
- package/dist/client/bundledDevClient.mjs +314 -4
- package/dist/client/client.mjs +4 -4
- package/dist/node/chunks/build.js +47 -43
- package/dist/node/chunks/dist.js +26 -85
- package/dist/node/chunks/node.js +512 -456
- package/dist/node/chunks/postcss-import.js +10 -10
- package/dist/node/index.d.ts +16 -4
- package/dist/node/module-runner.js +8 -3
- package/package.json +8 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ft as __commonJSMin, pt as __require } from "./node.js";
|
|
2
2
|
import { t as require_lib } from "./lib.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.
|
|
3
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/format-import-prelude.js
|
|
4
4
|
var require_format_import_prelude = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5
5
|
module.exports = function formatImportPrelude(layer, media, supports) {
|
|
6
6
|
const parts = [];
|
|
@@ -15,7 +15,7 @@ var require_format_import_prelude = /* @__PURE__ */ __commonJSMin(((exports, mod
|
|
|
15
15
|
};
|
|
16
16
|
}));
|
|
17
17
|
//#endregion
|
|
18
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.
|
|
18
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/base64-encoded-import.js
|
|
19
19
|
var require_base64_encoded_import = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
20
20
|
const formatImportPrelude = require_format_import_prelude();
|
|
21
21
|
module.exports = function base64EncodedConditionalImport(prelude, conditions) {
|
|
@@ -28,7 +28,7 @@ var require_base64_encoded_import = /* @__PURE__ */ __commonJSMin(((exports, mod
|
|
|
28
28
|
};
|
|
29
29
|
}));
|
|
30
30
|
//#endregion
|
|
31
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.
|
|
31
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/apply-conditions.js
|
|
32
32
|
var require_apply_conditions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
33
33
|
const base64EncodedConditionalImport = require_base64_encoded_import();
|
|
34
34
|
module.exports = function applyConditions(bundle, atRule) {
|
|
@@ -103,7 +103,7 @@ var require_apply_conditions = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
103
103
|
};
|
|
104
104
|
}));
|
|
105
105
|
//#endregion
|
|
106
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.
|
|
106
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/apply-raws.js
|
|
107
107
|
var require_apply_raws = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
108
108
|
module.exports = function applyRaws(bundle) {
|
|
109
109
|
bundle.forEach((stmt, index) => {
|
|
@@ -117,7 +117,7 @@ var require_apply_raws = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
117
117
|
};
|
|
118
118
|
}));
|
|
119
119
|
//#endregion
|
|
120
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.
|
|
120
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/apply-styles.js
|
|
121
121
|
var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
122
122
|
module.exports = function applyStyles(bundle, styles) {
|
|
123
123
|
styles.nodes = [];
|
|
@@ -137,7 +137,7 @@ var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
137
137
|
};
|
|
138
138
|
}));
|
|
139
139
|
//#endregion
|
|
140
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.
|
|
140
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/data-url.js
|
|
141
141
|
var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
142
142
|
const anyDataURLRegexp = /^data:text\/css(?:;(base64|plain))?,/i;
|
|
143
143
|
const base64DataURLRegexp = /^data:text\/css;base64,/i;
|
|
@@ -156,7 +156,7 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
156
156
|
};
|
|
157
157
|
}));
|
|
158
158
|
//#endregion
|
|
159
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.
|
|
159
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/parse-statements.js
|
|
160
160
|
var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
161
161
|
const valueParser = require_lib();
|
|
162
162
|
const { stringify } = valueParser;
|
|
@@ -281,7 +281,7 @@ var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
281
281
|
}
|
|
282
282
|
}));
|
|
283
283
|
//#endregion
|
|
284
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.
|
|
284
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/process-content.js
|
|
285
285
|
var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
286
286
|
const path$2 = __require("path");
|
|
287
287
|
let sugarss;
|
|
@@ -315,7 +315,7 @@ var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
315
315
|
}
|
|
316
316
|
}));
|
|
317
317
|
//#endregion
|
|
318
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.
|
|
318
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/parse-styles.js
|
|
319
319
|
var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
320
320
|
const path$1 = __require("path");
|
|
321
321
|
const dataURL = require_data_url();
|
|
@@ -418,7 +418,7 @@ var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
418
418
|
module.exports = parseStyles;
|
|
419
419
|
}));
|
|
420
420
|
//#endregion
|
|
421
|
-
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.
|
|
421
|
+
//#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/index.js
|
|
422
422
|
var require_postcss_import = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
423
423
|
const path = __require("path");
|
|
424
424
|
const applyConditions = require_apply_conditions();
|
package/dist/node/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ import { LessPreprocessorBaseOptions, SassModernPreprocessBaseOptions, StylusPre
|
|
|
30
30
|
import { withFilter } from "rolldown/filter";
|
|
31
31
|
import { GeneralImportGlobOptions, ImportGlobFunction, ImportGlobOptions, KnownAsTypeMap, KnownQueryTypeMap } from "#types/importGlob";
|
|
32
32
|
//#endregion
|
|
33
|
-
//#region ../../node_modules/.pnpm/@vitejs+devtools@0.4.
|
|
33
|
+
//#region ../../node_modules/.pnpm/@vitejs+devtools@0.4.10_crossws@0.4.10_srvx@0.12.5_typescript@6.0.3_valibot@1.4.2_vite@packages+vite/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
|
|
34
34
|
//#region src/node/cli-commands.d.ts
|
|
35
35
|
interface StartOptions {
|
|
36
36
|
root?: string;
|
|
@@ -40,7 +40,7 @@ interface StartOptions {
|
|
|
40
40
|
open?: boolean;
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
43
|
-
//#region ../../node_modules/.pnpm/@vitejs+devtools@0.4.
|
|
43
|
+
//#region ../../node_modules/.pnpm/@vitejs+devtools@0.4.10_crossws@0.4.10_srvx@0.12.5_typescript@6.0.3_valibot@1.4.2_vite@packages+vite/node_modules/@vitejs/devtools/dist/config.d.ts
|
|
44
44
|
//#region src/node/config.d.ts
|
|
45
45
|
interface DevToolsConfig extends Partial<StartOptions> {
|
|
46
46
|
enabled: boolean;
|
|
@@ -65,6 +65,16 @@ interface DevToolsConfig extends Partial<StartOptions> {
|
|
|
65
65
|
* will be auto-approved without a terminal prompt.
|
|
66
66
|
*/
|
|
67
67
|
clientAuthTokens?: string[];
|
|
68
|
+
/**
|
|
69
|
+
* Origins allowed to open the DevTools WebSocket connection, in addition to the built-in
|
|
70
|
+
* loopback allowlist (`localhost`, `127.0.0.1`, etc).
|
|
71
|
+
*
|
|
72
|
+
* The loopback check is a plain string match against the `Origin` header, not a DNS/hosts-file
|
|
73
|
+
* resolution — a custom dev hostname that resolves to loopback via `/etc/hosts` or a local DNS
|
|
74
|
+
* override (e.g. `dev-my-app.example.com`) is invisible to it and gets rejected. List such
|
|
75
|
+
* hostnames here explicitly.
|
|
76
|
+
*/
|
|
77
|
+
allowedOrigins?: string[];
|
|
68
78
|
}
|
|
69
79
|
interface ResolvedDevToolsConfig {
|
|
70
80
|
config: Omit<DevToolsConfig, 'enabled'> & {
|
|
@@ -1626,6 +1636,7 @@ declare class MemoryFiles {
|
|
|
1626
1636
|
declare class BundledDev {
|
|
1627
1637
|
private environment;
|
|
1628
1638
|
private _devEngine;
|
|
1639
|
+
private viteRuntime?;
|
|
1629
1640
|
private initialBuildCompleted;
|
|
1630
1641
|
private _closed;
|
|
1631
1642
|
private clients;
|
|
@@ -1638,6 +1649,7 @@ declare class BundledDev {
|
|
|
1638
1649
|
constructor(environment: DevEnvironment);
|
|
1639
1650
|
private get devEngine();
|
|
1640
1651
|
private pendingPayloadFilenames;
|
|
1652
|
+
get hasBuildOutput(): boolean;
|
|
1641
1653
|
listen(): Promise<void>;
|
|
1642
1654
|
private waitForInitialBuildFinish;
|
|
1643
1655
|
private ensureOutputAndFlushReloadNeeded;
|
|
@@ -2158,7 +2170,7 @@ interface BuildEnvironmentOptions {
|
|
|
2158
2170
|
/**
|
|
2159
2171
|
* Set to `false` to disable minification, or specify the minifier to use.
|
|
2160
2172
|
* Available options are 'oxc' or 'terser' or 'esbuild'.
|
|
2161
|
-
* @default 'oxc'
|
|
2173
|
+
* @default 'oxc' for client build, false for SSR build
|
|
2162
2174
|
*/
|
|
2163
2175
|
minify?: boolean | "oxc" | "terser" | "esbuild";
|
|
2164
2176
|
/**
|
|
@@ -3100,7 +3112,7 @@ type ResolveIdFn = (environment: PartialEnvironment, id: string, importer?: stri
|
|
|
3100
3112
|
*/
|
|
3101
3113
|
declare function createIdResolver(config: ResolvedConfig, options?: Partial<InternalResolveOptions>): ResolveIdFn;
|
|
3102
3114
|
//#endregion
|
|
3103
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
3115
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25_tsx@4.23.1_yaml@2.9.0/node_modules/postcss-load-config/src/index.d.ts
|
|
3104
3116
|
type ConfigPlugin = Transformer | PostCSS.Plugin | Processor;
|
|
3105
3117
|
interface Config {
|
|
3106
3118
|
parser?: string | ProcessOptions['parser'] | false;
|
|
@@ -71,7 +71,8 @@ function normalizeString(path, allowAboveRoot) {
|
|
|
71
71
|
let lastSlashIndex = res.lastIndexOf("/");
|
|
72
72
|
lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
|
|
73
73
|
continue;
|
|
74
|
-
}
|
|
74
|
+
}
|
|
75
|
+
if (res.length > 0) {
|
|
75
76
|
res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
|
|
76
77
|
continue;
|
|
77
78
|
}
|
|
@@ -871,7 +872,11 @@ function retrieveSourceMap(source) {
|
|
|
871
872
|
let sourceMappingURL = retrieveSourceMapURL(source);
|
|
872
873
|
if (!sourceMappingURL) return null;
|
|
873
874
|
let sourceMapData;
|
|
874
|
-
|
|
875
|
+
if (reSourceMap.test(sourceMappingURL)) {
|
|
876
|
+
let rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(",") + 1);
|
|
877
|
+
sourceMapData = decodeBase64(rawData), sourceMappingURL = source;
|
|
878
|
+
} else sourceMappingURL = supportRelativeURL(source, sourceMappingURL), sourceMapData = retrieveFile(sourceMappingURL);
|
|
879
|
+
return sourceMapData ? {
|
|
875
880
|
url: sourceMappingURL,
|
|
876
881
|
map: sourceMapData
|
|
877
882
|
} : null;
|
|
@@ -923,7 +928,7 @@ function CallSiteToString() {
|
|
|
923
928
|
let fileName, fileLocation = "";
|
|
924
929
|
if (this.isNative()) fileLocation = "native";
|
|
925
930
|
else {
|
|
926
|
-
fileName = this.getScriptNameOrSourceURL(), !fileName && this.isEval() && (fileLocation = this.getEvalOrigin(), fileLocation += ", "),
|
|
931
|
+
fileName = this.getScriptNameOrSourceURL(), !fileName && this.isEval() && (fileLocation = this.getEvalOrigin(), fileLocation += ", "), fileLocation += fileName || "<anonymous>";
|
|
927
932
|
let lineNumber = this.getLineNumber();
|
|
928
933
|
if (lineNumber != null) {
|
|
929
934
|
fileLocation += `:${lineNumber}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.1",
|
|
4
4
|
"description": "Native-ESM powered web dev build tool",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build-tool",
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"lightningcss": "^1.33.0",
|
|
60
60
|
"picomatch": "^4.0.5",
|
|
61
|
-
"postcss": "^8.5.
|
|
62
|
-
"rolldown": "~1.2.
|
|
61
|
+
"postcss": "^8.5.25",
|
|
62
|
+
"rolldown": "~1.2.1",
|
|
63
63
|
"tinyglobby": "^0.2.17"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@babel/parser": "^7.29.
|
|
66
|
+
"@babel/parser": "^7.29.8",
|
|
67
67
|
"@jridgewell/remapping": "^2.3.5",
|
|
68
68
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
69
69
|
"@polka/compression": "^1.0.0-next.25",
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
"@types/escape-html": "^1.0.4",
|
|
74
74
|
"@types/pnpapi": "^0.0.5",
|
|
75
75
|
"@vercel/detect-agent": "^1.2.3",
|
|
76
|
-
"@vitejs/devtools": "^0.4.
|
|
76
|
+
"@vitejs/devtools": "^0.4.10",
|
|
77
77
|
"@vitest/utils": "4.1.10",
|
|
78
78
|
"@voidzero-dev/vite-task-client": "^0.2.0",
|
|
79
79
|
"artichokie": "^0.4.4",
|
|
80
|
-
"baseline-browser-mapping": "^2.11.
|
|
80
|
+
"baseline-browser-mapping": "^2.11.10",
|
|
81
81
|
"cac": "^7.0.0",
|
|
82
82
|
"chokidar": "^3.6.0",
|
|
83
83
|
"connect": "^3.7.0",
|
|
@@ -109,13 +109,13 @@
|
|
|
109
109
|
"postcss-modules": "^9.0.1",
|
|
110
110
|
"premove": "^4.0.0",
|
|
111
111
|
"resolve.exports": "^2.0.3",
|
|
112
|
-
"rolldown-plugin-dts": "^0.
|
|
112
|
+
"rolldown-plugin-dts": "^0.28.0",
|
|
113
113
|
"rollup": "^4.59.0",
|
|
114
114
|
"rollup-plugin-license": "^3.7.1",
|
|
115
115
|
"sass": "^1.102.0",
|
|
116
116
|
"sass-embedded": "^1.100.0",
|
|
117
117
|
"sirv": "^3.0.2",
|
|
118
|
-
"strip-literal": "^
|
|
118
|
+
"strip-literal": "^4.0.0",
|
|
119
119
|
"terser": "^5.49.0",
|
|
120
120
|
"ufo": "^1.6.4",
|
|
121
121
|
"ws": "^8.21.1"
|