vite 8.1.0 → 8.1.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.
package/dist/client/client.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "@vite/env";
|
|
2
|
-
//#region ../../node_modules/.pnpm/nanoid@5.1.
|
|
2
|
+
//#region ../../node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/non-secure/index.js
|
|
3
3
|
let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
4
4
|
let nanoid = (size = 21) => {
|
|
5
5
|
let id = "";
|
|
6
6
|
let i = size | 0;
|
|
7
|
-
while (i--) id += urlAlphabet[Math.random() * 64 | 0];
|
|
7
|
+
while (i-- > 0) id += urlAlphabet[Math.random() * 64 | 0];
|
|
8
8
|
return id;
|
|
9
9
|
};
|
|
10
10
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { H as __require, z as __commonJSMin } from "./logger.js";
|
|
2
2
|
import { t as require_lib } from "./lib.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
3
|
+
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.16/node_modules/postcss-modules/build/fs.js
|
|
4
4
|
var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getFileSystem = getFileSystem;
|
|
@@ -22,7 +22,7 @@ var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
22
22
|
}
|
|
23
23
|
}));
|
|
24
24
|
//#endregion
|
|
25
|
-
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
25
|
+
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.16/node_modules/postcss-modules/build/unquote.js
|
|
26
26
|
var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
exports.default = unquote;
|
|
@@ -35,7 +35,7 @@ var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35
35
|
}
|
|
36
36
|
}));
|
|
37
37
|
//#endregion
|
|
38
|
-
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
38
|
+
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.16/node_modules/icss-utils/src/replaceValueSymbols.js
|
|
39
39
|
var require_replaceValueSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
40
40
|
const matchValueName = /[$]?[\w-]+/g;
|
|
41
41
|
const replaceValueSymbols = (value, replacements) => {
|
|
@@ -52,7 +52,7 @@ var require_replaceValueSymbols = /* @__PURE__ */ __commonJSMin(((exports, modul
|
|
|
52
52
|
module.exports = replaceValueSymbols;
|
|
53
53
|
}));
|
|
54
54
|
//#endregion
|
|
55
|
-
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
55
|
+
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.16/node_modules/icss-utils/src/replaceSymbols.js
|
|
56
56
|
var require_replaceSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
57
57
|
const replaceValueSymbols = require_replaceValueSymbols();
|
|
58
58
|
const replaceSymbols = (css, replacements) => {
|
|
@@ -65,7 +65,7 @@ var require_replaceSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
65
65
|
module.exports = replaceSymbols;
|
|
66
66
|
}));
|
|
67
67
|
//#endregion
|
|
68
|
-
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
68
|
+
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.16/node_modules/icss-utils/src/extractICSS.js
|
|
69
69
|
var require_extractICSS = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
70
70
|
const importPattern = /^:import\(("[^"]*"|'[^']*'|[^"']+)\)$/;
|
|
71
71
|
const balancedQuotes = /^("[^"]*"|'[^']*'|[^"']+)$/;
|
|
@@ -119,7 +119,7 @@ var require_extractICSS = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
119
119
|
module.exports = extractICSS;
|
|
120
120
|
}));
|
|
121
121
|
//#endregion
|
|
122
|
-
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
122
|
+
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.16/node_modules/icss-utils/src/createICSSRules.js
|
|
123
123
|
var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
124
124
|
const createImports = (imports, postcss, mode = "rule") => {
|
|
125
125
|
return Object.keys(imports).map((path) => {
|
|
@@ -163,7 +163,7 @@ var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
163
163
|
module.exports = createICSSRules;
|
|
164
164
|
}));
|
|
165
165
|
//#endregion
|
|
166
|
-
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
166
|
+
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.16/node_modules/icss-utils/src/index.js
|
|
167
167
|
var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
168
168
|
module.exports = {
|
|
169
169
|
replaceValueSymbols: require_replaceValueSymbols(),
|
|
@@ -173,7 +173,7 @@ var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
173
173
|
};
|
|
174
174
|
}));
|
|
175
175
|
//#endregion
|
|
176
|
-
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
176
|
+
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.16/node_modules/postcss-modules/build/Parser.js
|
|
177
177
|
var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
178
178
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
179
179
|
exports.default = void 0;
|
|
@@ -241,7 +241,7 @@ var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
241
241
|
exports.default = Parser;
|
|
242
242
|
}));
|
|
243
243
|
//#endregion
|
|
244
|
-
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
244
|
+
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.16/node_modules/postcss-modules/build/saveJSON.js
|
|
245
245
|
var require_saveJSON = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
246
246
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
247
247
|
exports.default = saveJSON;
|
|
@@ -883,7 +883,7 @@ var require_lodash_camelcase = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
883
883
|
module.exports = camelCase;
|
|
884
884
|
}));
|
|
885
885
|
//#endregion
|
|
886
|
-
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
886
|
+
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.16/node_modules/postcss-modules/build/localsConvention.js
|
|
887
887
|
var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
888
888
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
889
889
|
exports.makeLocalsConventionReducer = makeLocalsConventionReducer;
|
|
@@ -923,7 +923,7 @@ var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
923
923
|
}
|
|
924
924
|
}));
|
|
925
925
|
//#endregion
|
|
926
|
-
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
926
|
+
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.16/node_modules/postcss-modules/build/FileSystemLoader.js
|
|
927
927
|
var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
928
928
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
929
929
|
exports.default = void 0;
|
|
@@ -1008,7 +1008,7 @@ var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1008
1008
|
exports.default = FileSystemLoader;
|
|
1009
1009
|
}));
|
|
1010
1010
|
//#endregion
|
|
1011
|
-
//#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.
|
|
1011
|
+
//#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.16/node_modules/postcss-modules-extract-imports/src/topologicalSort.js
|
|
1012
1012
|
var require_topologicalSort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1013
1013
|
const PERMANENT_MARKER = 2;
|
|
1014
1014
|
const TEMPORARY_MARKER = 1;
|
|
@@ -1047,7 +1047,7 @@ var require_topologicalSort = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
1047
1047
|
module.exports = topologicalSort;
|
|
1048
1048
|
}));
|
|
1049
1049
|
//#endregion
|
|
1050
|
-
//#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.
|
|
1050
|
+
//#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.16/node_modules/postcss-modules-extract-imports/src/index.js
|
|
1051
1051
|
var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1052
1052
|
const topologicalSort = require_topologicalSort();
|
|
1053
1053
|
const matchImports = /^(.+?)\s+from\s+(?:"([^"]+)"|'([^']+)'|(global))$/;
|
|
@@ -4553,7 +4553,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4553
4553
|
module.exports = exports.default;
|
|
4554
4554
|
}));
|
|
4555
4555
|
//#endregion
|
|
4556
|
-
//#region ../../node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.
|
|
4556
|
+
//#region ../../node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.16/node_modules/postcss-modules-local-by-default/src/index.js
|
|
4557
4557
|
var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4558
4558
|
const selectorParser = require_dist();
|
|
4559
4559
|
const valueParser = require_lib();
|
|
@@ -4951,7 +4951,7 @@ var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4951
4951
|
module.exports.postcss = true;
|
|
4952
4952
|
}));
|
|
4953
4953
|
//#endregion
|
|
4954
|
-
//#region ../../node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.
|
|
4954
|
+
//#region ../../node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.16/node_modules/postcss-modules-scope/src/index.js
|
|
4955
4955
|
var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4956
4956
|
const selectorParser = require_dist();
|
|
4957
4957
|
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -5131,7 +5131,7 @@ var require_string_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5131
5131
|
module.exports = hash;
|
|
5132
5132
|
}));
|
|
5133
5133
|
//#endregion
|
|
5134
|
-
//#region ../../node_modules/.pnpm/postcss-modules-values@4.0.0_postcss@8.5.
|
|
5134
|
+
//#region ../../node_modules/.pnpm/postcss-modules-values@4.0.0_postcss@8.5.16/node_modules/postcss-modules-values/src/index.js
|
|
5135
5135
|
var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5136
5136
|
const ICSSUtils = require_src$4();
|
|
5137
5137
|
const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/;
|
|
@@ -5218,7 +5218,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5218
5218
|
module.exports.postcss = true;
|
|
5219
5219
|
}));
|
|
5220
5220
|
//#endregion
|
|
5221
|
-
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
5221
|
+
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.16/node_modules/postcss-modules/build/scoping.js
|
|
5222
5222
|
var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5223
5223
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5224
5224
|
exports.behaviours = void 0;
|
|
@@ -5280,7 +5280,7 @@ var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5280
5280
|
}
|
|
5281
5281
|
}));
|
|
5282
5282
|
//#endregion
|
|
5283
|
-
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
5283
|
+
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.16/node_modules/postcss-modules/build/pluginFactory.js
|
|
5284
5284
|
var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5285
5285
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5286
5286
|
exports.makePlugin = makePlugin;
|
|
@@ -5354,7 +5354,7 @@ var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5354
5354
|
}
|
|
5355
5355
|
}));
|
|
5356
5356
|
//#endregion
|
|
5357
|
-
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.
|
|
5357
|
+
//#region ../../node_modules/.pnpm/postcss-modules@6.0.1_postcss@8.5.16/node_modules/postcss-modules/build/index.js
|
|
5358
5358
|
var require_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5359
5359
|
var _fs = __require("fs");
|
|
5360
5360
|
var _fs2 = require_fs();
|
package/dist/node/chunks/node.js
CHANGED
|
@@ -2205,7 +2205,7 @@ function optimizeSafeRealPathSync() {
|
|
|
2205
2205
|
return;
|
|
2206
2206
|
}
|
|
2207
2207
|
}
|
|
2208
|
-
exec("net use", (error, stdout) => {
|
|
2208
|
+
exec("net use", { windowsHide: true }, (error, stdout) => {
|
|
2209
2209
|
if (error) return;
|
|
2210
2210
|
const lines = stdout.split("\n");
|
|
2211
2211
|
for (const line of lines) {
|
|
@@ -3119,7 +3119,7 @@ function reloadOnTsconfigChange(server, changedFile) {
|
|
|
3119
3119
|
}
|
|
3120
3120
|
}
|
|
3121
3121
|
//#endregion
|
|
3122
|
-
//#region ../../node_modules/.pnpm/artichokie@0.4.
|
|
3122
|
+
//#region ../../node_modules/.pnpm/artichokie@0.4.4/node_modules/artichokie/dist/index.js
|
|
3123
3123
|
const AsyncFunction = async function() {}.constructor;
|
|
3124
3124
|
const codeToDataUrl = (code) => `data:application/javascript,${encodeURIComponent(code + "\n//# sourceURL=[worker-eval(artichokie)]")}`;
|
|
3125
3125
|
const viteSsrDynamicImport = "__vite_ssr_dynamic_import__";
|
|
@@ -3331,7 +3331,13 @@ function genWorkerCode(fn, isModule, waitTimeout, parentFunctions) {
|
|
|
3331
3331
|
args
|
|
3332
3332
|
});
|
|
3333
3333
|
lock.waitUnlock();
|
|
3334
|
-
|
|
3334
|
+
let received;
|
|
3335
|
+
for (let i = 0; i < 10; i++) {
|
|
3336
|
+
received = receive(syncPort);
|
|
3337
|
+
if (received !== void 0) break;
|
|
3338
|
+
}
|
|
3339
|
+
if (received === void 0) throw new Error("Failed to receive message from sync port after 10 attempts");
|
|
3340
|
+
const resArgs = received.message;
|
|
3335
3341
|
if (resArgs.isAsync) {
|
|
3336
3342
|
let resolve, reject;
|
|
3337
3343
|
const promise = new Promise((res, rej) => {
|
|
@@ -3760,7 +3766,7 @@ function convertEsbuildConfigToOxcConfig(esbuildConfig, logger) {
|
|
|
3760
3766
|
default: break;
|
|
3761
3767
|
}
|
|
3762
3768
|
if (esbuildTransformOptions.jsxDev !== void 0) jsxOptions.development = esbuildTransformOptions.jsxDev;
|
|
3763
|
-
if (esbuildTransformOptions.jsxSideEffects !== void 0) jsxOptions.pure = esbuildTransformOptions.jsxSideEffects;
|
|
3769
|
+
if (esbuildTransformOptions.jsxSideEffects !== void 0) jsxOptions.pure = !esbuildTransformOptions.jsxSideEffects;
|
|
3764
3770
|
oxcOptions.jsx = jsxOptions;
|
|
3765
3771
|
}
|
|
3766
3772
|
if (esbuildTransformOptions.define) oxcOptions.define = esbuildTransformOptions.define;
|
|
@@ -20961,7 +20967,7 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
20961
20967
|
};
|
|
20962
20968
|
}));
|
|
20963
20969
|
//#endregion
|
|
20964
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
20970
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.16_tsx@4.22.4_yaml@2.9.0/node_modules/postcss-load-config/src/req.js
|
|
20965
20971
|
var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
20966
20972
|
const { createRequire: createRequire$1 } = __require("node:module");
|
|
20967
20973
|
const { fileURLToPath: fileURLToPath$1, pathToFileURL: pathToFileURL$1 } = __require("node:url");
|
|
@@ -21003,7 +21009,7 @@ var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
21003
21009
|
module.exports = req;
|
|
21004
21010
|
}));
|
|
21005
21011
|
//#endregion
|
|
21006
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
21012
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.16_tsx@4.22.4_yaml@2.9.0/node_modules/postcss-load-config/src/options.js
|
|
21007
21013
|
var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
21008
21014
|
const req = require_req();
|
|
21009
21015
|
/**
|
|
@@ -21037,7 +21043,7 @@ var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
21037
21043
|
module.exports = options;
|
|
21038
21044
|
}));
|
|
21039
21045
|
//#endregion
|
|
21040
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
21046
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.16_tsx@4.22.4_yaml@2.9.0/node_modules/postcss-load-config/src/plugins.js
|
|
21041
21047
|
var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
21042
21048
|
const req = require_req();
|
|
21043
21049
|
/**
|
|
@@ -21091,7 +21097,7 @@ var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
21091
21097
|
module.exports = plugins;
|
|
21092
21098
|
}));
|
|
21093
21099
|
//#endregion
|
|
21094
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
21100
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.16_tsx@4.22.4_yaml@2.9.0/node_modules/postcss-load-config/src/index.js
|
|
21095
21101
|
var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
21096
21102
|
const { resolve: resolve$3 } = __require("node:path");
|
|
21097
21103
|
const config = require_src$1();
|
|
@@ -21689,7 +21695,10 @@ function cssPostPlugin(config) {
|
|
|
21689
21695
|
const index = htmlProxyIndexRE.exec(id)?.[1];
|
|
21690
21696
|
if (index == null) throw new Error(`HTML proxy index in "${id}" not found`);
|
|
21691
21697
|
addToHTMLProxyTransformResult(`${getHash(cleanUrl(id))}_${Number.parseInt(index)}`, css);
|
|
21692
|
-
return
|
|
21698
|
+
return {
|
|
21699
|
+
code: `export default ''`,
|
|
21700
|
+
map: { mappings: "" }
|
|
21701
|
+
};
|
|
21693
21702
|
}
|
|
21694
21703
|
const inlined = inlineRE$2.test(id);
|
|
21695
21704
|
const modules = cssModulesCache.get(config).get(id);
|
|
@@ -22139,10 +22148,10 @@ async function compilePostCSS(environment, id, code, deps, lang, workerControlle
|
|
|
22139
22148
|
const atImportResolvers = getAtImportResolvers(environment.getTopLevelConfig());
|
|
22140
22149
|
const postcssPlugins = postcssConfig?.plugins.slice() ?? [];
|
|
22141
22150
|
if (needInlineImport) postcssPlugins.unshift((await importPostcssImport()).default({
|
|
22142
|
-
async resolve(id, basedir) {
|
|
22151
|
+
async resolve(id, basedir, _importOptions, atRule) {
|
|
22143
22152
|
const publicFile = checkPublicFile(id, environment.getTopLevelConfig());
|
|
22144
22153
|
if (publicFile) return publicFile;
|
|
22145
|
-
const resolved = await atImportResolvers.css(environment, id,
|
|
22154
|
+
const resolved = await atImportResolvers.css(environment, id, atRule.source?.input.file);
|
|
22146
22155
|
if (resolved) return path.resolve(resolved);
|
|
22147
22156
|
if (!path.isAbsolute(id)) environment.logger.error(import_picocolors.default.red(`Unable to resolve \`@import "${id}"\` from ${basedir}`));
|
|
22148
22157
|
return id;
|
|
@@ -22962,7 +22971,7 @@ const importEsbuild = createCachedImport(() => import("esbuild"));
|
|
|
22962
22971
|
const importLightningCSS = createCachedImport(() => import("lightningcss"));
|
|
22963
22972
|
async function compileLightningCSS(environment, id, src, deps, workerController, urlResolver) {
|
|
22964
22973
|
const { config } = environment;
|
|
22965
|
-
const filename = removeDirectQuery(id)
|
|
22974
|
+
const filename = removeDirectQuery(id);
|
|
22966
22975
|
let res;
|
|
22967
22976
|
try {
|
|
22968
22977
|
res = styleAttrRE.test(id) ? (await importLightningCSS()).transformStyleAttribute({
|
|
@@ -23074,7 +23083,7 @@ async function compileLightningCSS(environment, id, src, deps, workerController,
|
|
|
23074
23083
|
break;
|
|
23075
23084
|
}
|
|
23076
23085
|
case "import":
|
|
23077
|
-
css = css.replace(dep.placeholder, dep.url);
|
|
23086
|
+
css = css.replace(dep.placeholder, () => dep.url);
|
|
23078
23087
|
break;
|
|
23079
23088
|
default: throw new Error(`Unsupported dependency type: ${dep.type}`);
|
|
23080
23089
|
}
|
|
@@ -23619,6 +23628,7 @@ function buildHtmlPlugin(config) {
|
|
|
23619
23628
|
await Promise.all(setModuleSideEffectPromises);
|
|
23620
23629
|
return {
|
|
23621
23630
|
code: js,
|
|
23631
|
+
map: { mappings: "" },
|
|
23622
23632
|
moduleSideEffects: "no-treeshake"
|
|
23623
23633
|
};
|
|
23624
23634
|
}
|
|
@@ -24635,7 +24645,13 @@ function indexHtmlMiddleware(root, server) {
|
|
|
24635
24645
|
const url = req.url && cleanUrl(req.url);
|
|
24636
24646
|
if (url?.endsWith(".html") && req.headers["sec-fetch-dest"] !== "script") {
|
|
24637
24647
|
if (fullBundle) {
|
|
24638
|
-
|
|
24648
|
+
let pathname;
|
|
24649
|
+
try {
|
|
24650
|
+
pathname = decodeURIComponent(url);
|
|
24651
|
+
} catch {
|
|
24652
|
+
return next();
|
|
24653
|
+
}
|
|
24654
|
+
const filePath = pathname.slice(1);
|
|
24639
24655
|
let file = fullBundle.memoryFiles.get(filePath);
|
|
24640
24656
|
if (!file && fullBundle.memoryFiles.size !== 0) return next();
|
|
24641
24657
|
if ([
|
|
@@ -25690,11 +25706,12 @@ async function resolveServerOptions(root, raw, logger) {
|
|
|
25690
25706
|
sourcemapIgnoreList: isInNodeModules
|
|
25691
25707
|
}, raw ?? {});
|
|
25692
25708
|
setupHmrWsOptionCompat(_server);
|
|
25709
|
+
const workspaceRoot = searchForWorkspaceRoot(root);
|
|
25693
25710
|
const server = {
|
|
25694
25711
|
..._server,
|
|
25695
25712
|
fs: {
|
|
25696
25713
|
..._server.fs,
|
|
25697
|
-
allow: raw?.fs?.allow ?? [
|
|
25714
|
+
allow: raw?.fs?.allow ?? [workspaceRoot]
|
|
25698
25715
|
},
|
|
25699
25716
|
sourcemapIgnoreList: _server.sourcemapIgnoreList === false ? () => false : _server.sourcemapIgnoreList,
|
|
25700
25717
|
forwardConsole: await resolveForwardConsoleOptions(_server.forwardConsole)
|
|
@@ -25707,13 +25724,13 @@ async function resolveServerOptions(root, raw, logger) {
|
|
|
25707
25724
|
} catch (e) {
|
|
25708
25725
|
logger.warn(`Get yarn cache dir error: ${e.message}`, { timestamp: true });
|
|
25709
25726
|
}
|
|
25710
|
-
const pnpmModulesYaml = path.join(
|
|
25727
|
+
const pnpmModulesYaml = path.join(workspaceRoot, "node_modules", ".modules.yaml");
|
|
25711
25728
|
try {
|
|
25712
25729
|
const content = fs.readFileSync(pnpmModulesYaml, "utf-8");
|
|
25713
25730
|
const virtualStoreDir = JSON.parse(content).virtualStoreDir;
|
|
25714
25731
|
if (virtualStoreDir) {
|
|
25715
25732
|
if (path.isAbsolute(virtualStoreDir)) allowDirs.push(virtualStoreDir);
|
|
25716
|
-
else if (virtualStoreDir.startsWith("..")) allowDirs.push(path.resolve(path.join(
|
|
25733
|
+
else if (virtualStoreDir.startsWith("..")) allowDirs.push(path.resolve(path.join(workspaceRoot, "node_modules"), virtualStoreDir));
|
|
25717
25734
|
}
|
|
25718
25735
|
} catch {}
|
|
25719
25736
|
allowDirs = allowDirs.map((i) => resolvedAllowDir(root, i));
|
|
@@ -25962,7 +25979,7 @@ async function handleHMRUpdate(type, file, server) {
|
|
|
25962
25979
|
server
|
|
25963
25980
|
};
|
|
25964
25981
|
const hotMap = /* @__PURE__ */ new Map();
|
|
25965
|
-
for (const environment of
|
|
25982
|
+
for (const environment of environments) {
|
|
25966
25983
|
const mods = new Set(environment.moduleGraph.getModulesByFile(file));
|
|
25967
25984
|
if (type === "create") for (const mod of environment.moduleGraph._hasResolveFailedErrorModules) mods.add(mod);
|
|
25968
25985
|
const options = {
|
|
@@ -26009,7 +26026,7 @@ async function handleHMRUpdate(type, file, server) {
|
|
|
26009
26026
|
} catch (error) {
|
|
26010
26027
|
hotMap.get(server.environments.client).error = error;
|
|
26011
26028
|
}
|
|
26012
|
-
for (const environment of
|
|
26029
|
+
for (const environment of environments) {
|
|
26013
26030
|
if (environment.name === "client") continue;
|
|
26014
26031
|
const hot = hotMap.get(environment);
|
|
26015
26032
|
const context = environment.pluginContainer.minimalContext;
|
|
@@ -27072,7 +27089,7 @@ function importAnalysisPlugin(config) {
|
|
|
27072
27089
|
}
|
|
27073
27090
|
} else if (!importer.startsWith(withTrailingSlash(clientDir))) {
|
|
27074
27091
|
if (!isInNodeModules(importer)) {
|
|
27075
|
-
if (!hasViteIgnoreRE.test(source.slice(dynamicIndex + 1, end))) this.warn(`\n` + import_picocolors.default.cyan(importerModule.file) + `\n` + import_picocolors.default.reset(generateCodeFrame(source, start, end)) + import_picocolors.default.yellow(`\nThe above dynamic import cannot be analyzed by Vite.\nSee ${import_picocolors.default.blue(`https://
|
|
27092
|
+
if (!hasViteIgnoreRE.test(source.slice(dynamicIndex + 1, end))) this.warn(`\n` + import_picocolors.default.cyan(importerModule.file) + `\n` + import_picocolors.default.reset(generateCodeFrame(source, start, end)) + import_picocolors.default.yellow(`\nThe above dynamic import cannot be analyzed by Vite.\nSee ${import_picocolors.default.blue(`https://vite.dev/guide/features#dynamic-import`)} for supported dynamic import formats. If this is intended to be left as-is, you can use the /* @vite-ignore */ comment inside the import() call to suppress this warning.\n`));
|
|
27076
27093
|
}
|
|
27077
27094
|
if (!ssr) {
|
|
27078
27095
|
if (!urlIsStringRE.test(rawUrl) || isExplicitImportRequired(rawUrl.slice(1, -1))) {
|
|
@@ -28685,7 +28702,7 @@ function createFilterForTransform(idFilter, codeFilter, moduleTypeFilter, cwd) {
|
|
|
28685
28702
|
};
|
|
28686
28703
|
}
|
|
28687
28704
|
//#endregion
|
|
28688
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.
|
|
28705
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.9/node_modules/@vitest/utils/dist/helpers.js
|
|
28689
28706
|
function notNullish(v) {
|
|
28690
28707
|
return v != null;
|
|
28691
28708
|
}
|
|
@@ -28693,7 +28710,7 @@ function isPrimitive(value) {
|
|
|
28693
28710
|
return value === null || typeof value !== "function" && typeof value !== "object";
|
|
28694
28711
|
}
|
|
28695
28712
|
//#endregion
|
|
28696
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.
|
|
28713
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.9/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js
|
|
28697
28714
|
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
28698
28715
|
function normalizeWindowsPath(input = "") {
|
|
28699
28716
|
if (!input) return input;
|
|
@@ -28772,7 +28789,7 @@ const isAbsolute$2 = function(p) {
|
|
|
28772
28789
|
return _IS_ABSOLUTE_RE.test(p);
|
|
28773
28790
|
};
|
|
28774
28791
|
//#endregion
|
|
28775
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.
|
|
28792
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.9/node_modules/@vitest/utils/dist/source-map.js
|
|
28776
28793
|
var comma = ",".charCodeAt(0);
|
|
28777
28794
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
28778
28795
|
var intToChar = /* @__PURE__ */ new Uint8Array(64);
|
|
@@ -30202,6 +30219,7 @@ function scanImports(environment) {
|
|
|
30202
30219
|
missing
|
|
30203
30220
|
};
|
|
30204
30221
|
} catch (e) {
|
|
30222
|
+
if (e.errors?.some((error) => error.pluginCode === "ERR_CLOSED_SERVER")) return;
|
|
30205
30223
|
e.message = import_picocolors.default.red(`\
|
|
30206
30224
|
Failed to scan for dependencies from entries:
|
|
30207
30225
|
${entries.join("\n")}
|
|
@@ -30227,7 +30245,7 @@ async function computeEntries(environment) {
|
|
|
30227
30245
|
if (explicitEntryPatterns) entries = await globEntries(explicitEntryPatterns, environment);
|
|
30228
30246
|
else if (buildInput) {
|
|
30229
30247
|
const resolvePath = async (p) => {
|
|
30230
|
-
const id = (await environment.pluginContainer.resolveId(p,
|
|
30248
|
+
const id = (await environment.pluginContainer.resolveId(p, void 0, {
|
|
30231
30249
|
isEntry: true,
|
|
30232
30250
|
scan: true
|
|
30233
30251
|
}))?.id;
|
|
@@ -33150,14 +33168,14 @@ function createDepsOptimizer(environment) {
|
|
|
33150
33168
|
let newDepsToLogHandle;
|
|
33151
33169
|
const logNewlyDiscoveredDeps = () => {
|
|
33152
33170
|
if (newDepsToLog.length) {
|
|
33153
|
-
logger.info(import_picocolors.default.green(
|
|
33171
|
+
logger.info(import_picocolors.default.green(`${newDepsToLog.length === 1 ? "dependency" : "dependencies"} optimized: ${depsLogString(newDepsToLog)}`), { timestamp: true });
|
|
33154
33172
|
newDepsToLog = [];
|
|
33155
33173
|
}
|
|
33156
33174
|
};
|
|
33157
33175
|
let discoveredDepsWhileScanning = [];
|
|
33158
|
-
const
|
|
33176
|
+
const logOptimizeDepsIncludeSuggestion = (reason) => {
|
|
33159
33177
|
if (discoveredDepsWhileScanning.length) {
|
|
33160
|
-
logger.info(import_picocolors.default.
|
|
33178
|
+
logger.info(import_picocolors.default.magenta(`tip: consider adding ${depsLogString(discoveredDepsWhileScanning)} to optimizeDeps.include to ${reason}`) + import_picocolors.default.dim(`\n See https://vite.dev/guide/dep-pre-bundling.html#customizing-the-behavior`), { timestamp: true });
|
|
33161
33179
|
discoveredDepsWhileScanning = [];
|
|
33162
33180
|
}
|
|
33163
33181
|
};
|
|
@@ -33321,15 +33339,14 @@ function createDepsOptimizer(environment) {
|
|
|
33321
33339
|
newDepsToLogHandle = void 0;
|
|
33322
33340
|
logNewlyDiscoveredDeps();
|
|
33323
33341
|
if (warnAboutMissedDependencies) {
|
|
33324
|
-
|
|
33325
|
-
logger.info(import_picocolors.default.magenta(`❗ add these dependencies to optimizeDeps.include to speed up cold start`), { timestamp: true });
|
|
33342
|
+
logOptimizeDepsIncludeSuggestion("speed up cold start");
|
|
33326
33343
|
warnAboutMissedDependencies = false;
|
|
33327
33344
|
}
|
|
33328
33345
|
}, 2 * debounceMs);
|
|
33329
|
-
} else debug$2(import_picocolors.default.green(
|
|
33346
|
+
} else debug$2(import_picocolors.default.green(!isRerun ? `dependencies optimized` : `optimized dependencies unchanged`));
|
|
33330
33347
|
} else if (newDepsDiscovered) {
|
|
33331
33348
|
processingResult.cancel();
|
|
33332
|
-
debug$2?.(import_picocolors.default.green(
|
|
33349
|
+
debug$2?.(import_picocolors.default.green(`delaying reload as new dependencies have been found...`));
|
|
33333
33350
|
} else {
|
|
33334
33351
|
await commitProcessing();
|
|
33335
33352
|
if (!debug$2) {
|
|
@@ -33337,12 +33354,11 @@ function createDepsOptimizer(environment) {
|
|
|
33337
33354
|
newDepsToLogHandle = void 0;
|
|
33338
33355
|
logNewlyDiscoveredDeps();
|
|
33339
33356
|
if (warnAboutMissedDependencies) {
|
|
33340
|
-
|
|
33341
|
-
logger.info(import_picocolors.default.magenta(`❗ add these dependencies to optimizeDeps.include to avoid a full page reload during cold start`), { timestamp: true });
|
|
33357
|
+
logOptimizeDepsIncludeSuggestion("avoid a full page reload during cold start");
|
|
33342
33358
|
warnAboutMissedDependencies = false;
|
|
33343
33359
|
}
|
|
33344
33360
|
}
|
|
33345
|
-
logger.info(import_picocolors.default.green(
|
|
33361
|
+
logger.info(import_picocolors.default.green(`optimized dependencies changed. reloading`), { timestamp: true });
|
|
33346
33362
|
if (needsInteropMismatch.length > 0) logger.warn(`Mixed ESM and CJS detected in ${import_picocolors.default.yellow(needsInteropMismatch.join(", "))}, add ${needsInteropMismatch.length === 1 ? "it" : "them"} to optimizeDeps.needsInterop to speed up cold start`, { timestamp: true });
|
|
33347
33363
|
fullReload();
|
|
33348
33364
|
}
|
|
@@ -33407,7 +33423,7 @@ function createDepsOptimizer(environment) {
|
|
|
33407
33423
|
}
|
|
33408
33424
|
async function onCrawlEnd() {
|
|
33409
33425
|
waitingForCrawlEnd = false;
|
|
33410
|
-
debug$2?.(import_picocolors.default.green(
|
|
33426
|
+
debug$2?.(import_picocolors.default.green(`static imports crawl ended`));
|
|
33411
33427
|
if (closed) return;
|
|
33412
33428
|
await depsOptimizer.scanProcessing;
|
|
33413
33429
|
if (optimizationResult && !options.noDiscovery) {
|
|
@@ -33418,7 +33434,7 @@ function createDepsOptimizer(environment) {
|
|
|
33418
33434
|
const crawlDeps = Object.keys(metadata.discovered);
|
|
33419
33435
|
const scanDeps = Object.keys(result.metadata.optimized);
|
|
33420
33436
|
if (scanDeps.length === 0 && crawlDeps.length === 0) {
|
|
33421
|
-
debug$2?.(import_picocolors.default.green(
|
|
33437
|
+
debug$2?.(import_picocolors.default.green(`no dependencies found by the scanner or crawling static imports`));
|
|
33422
33438
|
startNextDiscoveredBatch();
|
|
33423
33439
|
runOptimizer(result);
|
|
33424
33440
|
return;
|
|
@@ -33428,17 +33444,17 @@ function createDepsOptimizer(environment) {
|
|
|
33428
33444
|
if (needsInteropMismatch.length > 0 || scannerMissedDeps) {
|
|
33429
33445
|
result.cancel();
|
|
33430
33446
|
for (const dep of scanDeps) if (!crawlDeps.includes(dep)) addMissingDep(dep, result.metadata.optimized[dep].src);
|
|
33431
|
-
if (scannerMissedDeps) debug$2?.(import_picocolors.default.yellow(
|
|
33432
|
-
debug$2?.(import_picocolors.default.green(
|
|
33447
|
+
if (scannerMissedDeps) debug$2?.(import_picocolors.default.yellow(`new dependencies were found while crawling that weren't detected by the scanner`));
|
|
33448
|
+
debug$2?.(import_picocolors.default.green(`re-running optimizer`));
|
|
33433
33449
|
debouncedProcessing(0);
|
|
33434
33450
|
} else {
|
|
33435
|
-
debug$2?.(import_picocolors.default.green(
|
|
33451
|
+
debug$2?.(import_picocolors.default.green(`using post-scan optimizer result, the scanner found every used dependency`));
|
|
33436
33452
|
startNextDiscoveredBatch();
|
|
33437
33453
|
runOptimizer(result);
|
|
33438
33454
|
}
|
|
33439
33455
|
} else if (!holdUntilCrawlEnd) {
|
|
33440
33456
|
if (newDepsDiscovered) {
|
|
33441
|
-
debug$2?.(import_picocolors.default.green(
|
|
33457
|
+
debug$2?.(import_picocolors.default.green(`new dependencies were found while crawling static imports, re-running optimizer`));
|
|
33442
33458
|
warnAboutMissedDependencies = true;
|
|
33443
33459
|
debouncedProcessing(0);
|
|
33444
33460
|
}
|
|
@@ -33446,7 +33462,7 @@ function createDepsOptimizer(environment) {
|
|
|
33446
33462
|
const crawlDeps = Object.keys(metadata.discovered);
|
|
33447
33463
|
currentlyProcessing = false;
|
|
33448
33464
|
if (crawlDeps.length === 0) {
|
|
33449
|
-
debug$2?.(import_picocolors.default.green(
|
|
33465
|
+
debug$2?.(import_picocolors.default.green(`no dependencies found while crawling the static imports`));
|
|
33450
33466
|
firstRunCalled = true;
|
|
33451
33467
|
}
|
|
33452
33468
|
debouncedProcessing(0);
|
|
@@ -33485,7 +33501,7 @@ function findInteropMismatches(discovered, optimized) {
|
|
|
33485
33501
|
if (!depInfo) continue;
|
|
33486
33502
|
if (depInfo.needsInterop !== discoveredDepInfo.needsInterop) {
|
|
33487
33503
|
needsInteropMismatch.push(dep);
|
|
33488
|
-
debug$2?.(import_picocolors.default.cyan(
|
|
33504
|
+
debug$2?.(import_picocolors.default.cyan(`needsInterop mismatch detected for ${dep}`));
|
|
33489
33505
|
}
|
|
33490
33506
|
}
|
|
33491
33507
|
return needsInteropMismatch;
|
|
@@ -33943,18 +33959,15 @@ var BundledDev = class {
|
|
|
33943
33959
|
return;
|
|
33944
33960
|
}
|
|
33945
33961
|
this.lastBuildError = null;
|
|
33946
|
-
|
|
33947
|
-
const source = outputFile.type === "chunk" ? outputFile.code : outputFile.source;
|
|
33948
|
-
return {
|
|
33949
|
-
source,
|
|
33950
|
-
etag: (0, import_etag.default)(Buffer.from(source), { weak: true })
|
|
33951
|
-
};
|
|
33952
|
-
});
|
|
33962
|
+
this.storeOutputFiles(result.output);
|
|
33953
33963
|
if (this.fullReloadPending) {
|
|
33954
33964
|
this.fullReloadPending = false;
|
|
33955
33965
|
this.debouncedFullReload();
|
|
33956
33966
|
}
|
|
33957
33967
|
},
|
|
33968
|
+
onAdditionalAssets: (result) => {
|
|
33969
|
+
this.storeOutputFiles(result.output);
|
|
33970
|
+
},
|
|
33958
33971
|
watch: { skipWrite: true }
|
|
33959
33972
|
});
|
|
33960
33973
|
debug$1?.("INITIAL: setup dev engine");
|
|
@@ -34033,6 +34046,15 @@ var BundledDev = class {
|
|
|
34033
34046
|
await this._devEngine?.close();
|
|
34034
34047
|
this.initialBuildCompleted = false;
|
|
34035
34048
|
}
|
|
34049
|
+
storeOutputFiles(output) {
|
|
34050
|
+
for (const outputFile of output) this.memoryFiles.set(outputFile.fileName, () => {
|
|
34051
|
+
const source = outputFile.type === "chunk" ? outputFile.code : outputFile.source;
|
|
34052
|
+
return {
|
|
34053
|
+
source,
|
|
34054
|
+
etag: (0, import_etag.default)(Buffer.from(source), { weak: true })
|
|
34055
|
+
};
|
|
34056
|
+
});
|
|
34057
|
+
}
|
|
34036
34058
|
async getRolldownOptions() {
|
|
34037
34059
|
const chunkMetadataMap = new ChunkMetadataMap();
|
|
34038
34060
|
const rolldownOptions = resolveRolldownOptions(this.environment, chunkMetadataMap);
|
|
@@ -34044,6 +34066,19 @@ var BundledDev = class {
|
|
|
34044
34066
|
};
|
|
34045
34067
|
rolldownOptions.optimization ??= {};
|
|
34046
34068
|
rolldownOptions.optimization.inlineConst = false;
|
|
34069
|
+
const plugins = await asyncFlatten([rolldownOptions.plugins]);
|
|
34070
|
+
for (const plugin of plugins) {
|
|
34071
|
+
const transform = plugin && "transform" in plugin ? plugin.transform : void 0;
|
|
34072
|
+
if (!transform) continue;
|
|
34073
|
+
const handler = typeof transform === "function" ? transform : transform.handler;
|
|
34074
|
+
const wrappedHandler = function(code, id, opts) {
|
|
34075
|
+
if (id.includes("?rolldown-lazy=")) return null;
|
|
34076
|
+
return handler.call(this, code, id, opts);
|
|
34077
|
+
};
|
|
34078
|
+
if (typeof transform === "function") plugin.transform = wrappedHandler;
|
|
34079
|
+
else transform.handler = wrappedHandler;
|
|
34080
|
+
}
|
|
34081
|
+
rolldownOptions.plugins = plugins;
|
|
34047
34082
|
if (Array.isArray(rolldownOptions.output)) for (const output of rolldownOptions.output) {
|
|
34048
34083
|
output.entryFileNames = "assets/[name].js";
|
|
34049
34084
|
output.chunkFileNames = "assets/[name]-[hash].js";
|
|
@@ -34275,7 +34310,7 @@ var DevEnvironment = class extends BaseEnvironment {
|
|
|
34275
34310
|
}
|
|
34276
34311
|
invalidateModule(m, _client) {
|
|
34277
34312
|
if (this.bundledDev) {
|
|
34278
|
-
this.invalidateModule(m, _client);
|
|
34313
|
+
this.bundledDev.invalidateModule(m, _client);
|
|
34279
34314
|
return;
|
|
34280
34315
|
}
|
|
34281
34316
|
const mod = this.moduleGraph.urlToModuleMap.get(m.path);
|
|
@@ -35651,17 +35686,19 @@ const _require = createRequire(
|
|
|
35651
35686
|
);
|
|
35652
35687
|
async function loadConfigFromBundledFile(fileName, bundledCode, isESM) {
|
|
35653
35688
|
if (isESM) {
|
|
35654
|
-
|
|
35655
|
-
|
|
35656
|
-
|
|
35689
|
+
const nodeModulesDir = typeof process.versions.deno === "string" ? void 0 : findNearestNodeModules(path.dirname(fileName));
|
|
35690
|
+
let viteTempDir = nodeModulesDir ? path.resolve(nodeModulesDir, ".vite-temp") : void 0;
|
|
35691
|
+
if (viteTempDir) try {
|
|
35692
|
+
await fsp.mkdir(viteTempDir, { recursive: true });
|
|
35657
35693
|
} catch (e) {
|
|
35658
|
-
if (e.code === "EACCES")
|
|
35694
|
+
if (e.code === "EACCES") viteTempDir = void 0;
|
|
35659
35695
|
else throw e;
|
|
35660
35696
|
}
|
|
35661
35697
|
const hash = `timestamp-${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
35662
|
-
const tempFileName =
|
|
35663
|
-
|
|
35664
|
-
|
|
35698
|
+
const tempFileName = viteTempDir ? path.resolve(viteTempDir, `${path.basename(fileName)}.${hash}.mjs`) : `${fileName}.${hash}.mjs`;
|
|
35699
|
+
const pathToIgnore = viteTempDir ?? tempFileName;
|
|
35700
|
+
ignoreInput(pathToIgnore);
|
|
35701
|
+
ignoreOutput(pathToIgnore);
|
|
35665
35702
|
await fsp.writeFile(tempFileName, bundledCode);
|
|
35666
35703
|
try {
|
|
35667
35704
|
return (await import(pathToFileURL(tempFileName).href)).default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { H as __require, z as __commonJSMin } from "./logger.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.16/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.16/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.16/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.16/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.16/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.16/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.16/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.16/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.16/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.16/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
|
@@ -1641,6 +1641,7 @@ declare class BundledDev {
|
|
|
1641
1641
|
triggerBundleRegenerationIfStale(): Promise<boolean>;
|
|
1642
1642
|
triggerLazyBundling(moduleId: string | null, clientId: string | null): Promise<string | undefined>;
|
|
1643
1643
|
close(): Promise<void>;
|
|
1644
|
+
private storeOutputFiles;
|
|
1644
1645
|
private getRolldownOptions;
|
|
1645
1646
|
private handleHmrOutput;
|
|
1646
1647
|
}
|
|
@@ -534,10 +534,10 @@ const {${missingBindings.join(", ")}} = pkg;
|
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
//#endregion
|
|
537
|
-
//#region ../../node_modules/.pnpm/nanoid@5.1.
|
|
537
|
+
//#region ../../node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/non-secure/index.js
|
|
538
538
|
let nanoid = (size = 21) => {
|
|
539
539
|
let id = "", i = size | 0;
|
|
540
|
-
for (; i
|
|
540
|
+
for (; i-- > 0;) id += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[Math.random() * 64 | 0];
|
|
541
541
|
return id;
|
|
542
542
|
};
|
|
543
543
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.2",
|
|
4
4
|
"description": "Native-ESM powered web dev build tool",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build-tool",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"lightningcss": "^1.32.0",
|
|
60
60
|
"picomatch": "^4.0.4",
|
|
61
|
-
"postcss": "^8.5.
|
|
62
|
-
"rolldown": "~1.1.
|
|
61
|
+
"postcss": "^8.5.16",
|
|
62
|
+
"rolldown": "~1.1.3",
|
|
63
63
|
"tinyglobby": "^0.2.17"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
@@ -74,10 +74,10 @@
|
|
|
74
74
|
"@types/pnpapi": "^0.0.5",
|
|
75
75
|
"@vercel/detect-agent": "^1.2.3",
|
|
76
76
|
"@vitejs/devtools": "^0.3.3",
|
|
77
|
-
"@vitest/utils": "4.1.
|
|
77
|
+
"@vitest/utils": "4.1.9",
|
|
78
78
|
"@voidzero-dev/vite-task-client": "^0.2.0",
|
|
79
|
-
"artichokie": "^0.4.
|
|
80
|
-
"baseline-browser-mapping": "^2.10.
|
|
79
|
+
"artichokie": "^0.4.4",
|
|
80
|
+
"baseline-browser-mapping": "^2.10.40",
|
|
81
81
|
"cac": "^7.0.0",
|
|
82
82
|
"chokidar": "^3.6.0",
|
|
83
83
|
"connect": "^3.7.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"cors": "^2.8.6",
|
|
86
86
|
"cross-spawn": "^7.0.6",
|
|
87
87
|
"dotenv-expand": "^13.0.0",
|
|
88
|
-
"es-module-lexer": "
|
|
88
|
+
"es-module-lexer": "2.1.0",
|
|
89
89
|
"esbuild": "^0.28.1",
|
|
90
90
|
"escape-html": "^1.0.3",
|
|
91
91
|
"estree-walker": "^3.0.3",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"magic-string": "^0.30.21",
|
|
98
98
|
"mlly": "^1.8.2",
|
|
99
99
|
"mrmime": "^2.0.1",
|
|
100
|
-
"nanoid": "^5.1.
|
|
100
|
+
"nanoid": "^5.1.16",
|
|
101
101
|
"obug": "^1.0.2",
|
|
102
102
|
"open": "^10.2.0",
|
|
103
103
|
"parse5": "^8.0.1",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"postcss-modules": "^6.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.26.0",
|
|
113
113
|
"rollup": "^4.59.0",
|
|
114
114
|
"rollup-plugin-license": "^3.7.1",
|
|
115
115
|
"sass": "^1.101.0",
|