vite 7.0.2 → 7.0.4
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 +5 -5
- package/dist/node/chunks/{dep-9VG2sVxV.js → dep-C8ByWFY_.js} +1 -1
- package/dist/node/chunks/{dep-Cm-wi8LO.js → dep-DDxIcCnt.js} +1 -1
- package/dist/node/chunks/{dep-CWDKzjJ3.js → dep-DFHPNLee.js} +1 -1
- package/dist/node/chunks/{dep-CXCa-anf.js → dep-DZ2tZksn.js} +59 -40
- package/dist/node/chunks/{dep-DytQrE0P.js → dep-JtmpCfr0.js} +1 -1
- package/dist/node/cli.js +5 -5
- package/dist/node/index.js +1 -1
- package/package.json +7 -8
package/dist/client/client.mjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import "@vite/env";
|
2
2
|
|
3
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.
|
3
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.1/node_modules/@oxc-project/runtime/src/helpers/esm/typeof.js
|
4
4
|
function _typeof(o) {
|
5
5
|
"@babel/helpers - typeof";
|
6
6
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
|
@@ -11,7 +11,7 @@ function _typeof(o) {
|
|
11
11
|
}
|
12
12
|
|
13
13
|
//#endregion
|
14
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.
|
14
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.1/node_modules/@oxc-project/runtime/src/helpers/esm/toPrimitive.js
|
15
15
|
function toPrimitive(t, r) {
|
16
16
|
if ("object" != _typeof(t) || !t) return t;
|
17
17
|
var e = t[Symbol.toPrimitive];
|
@@ -24,14 +24,14 @@ function toPrimitive(t, r) {
|
|
24
24
|
}
|
25
25
|
|
26
26
|
//#endregion
|
27
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.
|
27
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.1/node_modules/@oxc-project/runtime/src/helpers/esm/toPropertyKey.js
|
28
28
|
function toPropertyKey(t) {
|
29
29
|
var i = toPrimitive(t, "string");
|
30
30
|
return "symbol" == _typeof(i) ? i : i + "";
|
31
31
|
}
|
32
32
|
|
33
33
|
//#endregion
|
34
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.
|
34
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.75.1/node_modules/@oxc-project/runtime/src/helpers/esm/defineProperty.js
|
35
35
|
function _defineProperty(e, r, t) {
|
36
36
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
37
37
|
value: t,
|
@@ -782,7 +782,7 @@ your current setup:
|
|
782
782
|
};
|
783
783
|
})());
|
784
784
|
let willUnload = false;
|
785
|
-
if (typeof window !== "undefined") window.addEventListener("beforeunload", () => {
|
785
|
+
if (typeof window !== "undefined") window.addEventListener?.("beforeunload", () => {
|
786
786
|
willUnload = true;
|
787
787
|
});
|
788
788
|
function cleanUrl(pathname) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createRequire as ___createRequire } from 'module'; const require = ___createRequire(import.meta.url);
|
2
|
-
import { _createServer, createServer, createServerCloseFn, resolveServerOptions, restartServerWithUrls, serverConfigDefaults } from "./dep-
|
2
|
+
import { _createServer, createServer, createServerCloseFn, resolveServerOptions, restartServerWithUrls, serverConfigDefaults } from "./dep-DZ2tZksn.js";
|
3
3
|
import "./dep-Ctugieod.js";
|
4
4
|
|
5
5
|
export { createServer };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createRequire as ___createRequire } from 'module'; const require = ___createRequire(import.meta.url);
|
2
|
-
import { addManuallyIncludedOptimizeDeps, addOptimizedDepInfo, cleanupDepsCacheStaleDirs, createIsOptimizedDepFile, createIsOptimizedDepUrl, depsFromOptimizedDepInfo, depsLogString, discoverProjectDependencies, extractExportsData, getDepsCacheDir, getOptimizedDepPath, initDepsOptimizerMetadata, isDepOptimizationDisabled, loadCachedDepOptimizationMetadata, optimizeDeps, optimizeExplicitEnvironmentDeps, optimizedDepInfoFromFile, optimizedDepInfoFromId, optimizedDepNeedsInterop, runOptimizeDeps, toDiscoveredDependencies } from "./dep-
|
2
|
+
import { addManuallyIncludedOptimizeDeps, addOptimizedDepInfo, cleanupDepsCacheStaleDirs, createIsOptimizedDepFile, createIsOptimizedDepUrl, depsFromOptimizedDepInfo, depsLogString, discoverProjectDependencies, extractExportsData, getDepsCacheDir, getOptimizedDepPath, initDepsOptimizerMetadata, isDepOptimizationDisabled, loadCachedDepOptimizationMetadata, optimizeDeps, optimizeExplicitEnvironmentDeps, optimizedDepInfoFromFile, optimizedDepInfoFromId, optimizedDepNeedsInterop, runOptimizeDeps, toDiscoveredDependencies } from "./dep-DZ2tZksn.js";
|
3
3
|
import "./dep-Ctugieod.js";
|
4
4
|
|
5
5
|
export { optimizeDeps };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createRequire as ___createRequire } from 'module'; const require = ___createRequire(import.meta.url);
|
2
|
-
import { preview, resolvePreviewOptions } from "./dep-
|
2
|
+
import { preview, resolvePreviewOptions } from "./dep-DZ2tZksn.js";
|
3
3
|
import "./dep-Ctugieod.js";
|
4
4
|
|
5
5
|
export { preview };
|
@@ -512,7 +512,7 @@ function resolve$3(input, base) {
|
|
512
512
|
}
|
513
513
|
|
514
514
|
//#endregion
|
515
|
-
//#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.
|
515
|
+
//#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.29/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
|
516
516
|
function stripFilename(path$13) {
|
517
517
|
if (!path$13) return "";
|
518
518
|
const index = path$13.lastIndexOf("/");
|
@@ -6780,10 +6780,10 @@ async function reloadOnTsconfigChange(server, changedFile) {
|
|
6780
6780
|
}
|
6781
6781
|
|
6782
6782
|
//#endregion
|
6783
|
-
//#region ../../node_modules/.pnpm/artichokie@0.3.
|
6784
|
-
|
6785
|
-
|
6786
|
-
|
6783
|
+
//#region ../../node_modules/.pnpm/artichokie@0.3.2/node_modules/artichokie/dist/index.js
|
6784
|
+
const AsyncFunction = async function() {}.constructor;
|
6785
|
+
const codeToDataUrl = (code) => `data:application/javascript,${encodeURIComponent(code + "\n//# sourceURL=[worker-eval(artichokie)]")}`;
|
6786
|
+
const viteSsrDynamicImport = "__vite_ssr_dynamic_import__";
|
6787
6787
|
var Worker$1 = class {
|
6788
6788
|
/** @internal */
|
6789
6789
|
_isModule;
|
@@ -6996,10 +6996,10 @@ function genWorkerCode(fn, isModule, parentFunctions) {
|
|
6996
6996
|
else return resArgs.result;
|
6997
6997
|
};
|
6998
6998
|
asyncPort.on("message", (args) => {
|
6999
|
-
const
|
7000
|
-
if (resolvers.has(
|
7001
|
-
const { resolve: resolve$4, reject } = resolvers.get(
|
7002
|
-
resolvers.delete(
|
6999
|
+
const id$1 = args.id;
|
7000
|
+
if (resolvers.has(id$1)) {
|
7001
|
+
const { resolve: resolve$4, reject } = resolvers.get(id$1);
|
7002
|
+
resolvers.delete(id$1);
|
7003
7003
|
if ("result" in args) resolve$4(args.result);
|
7004
7004
|
else reject(args.error);
|
7005
7005
|
}
|
@@ -7036,8 +7036,8 @@ parentPort.on('message', async (args) => {
|
|
7036
7036
|
})
|
7037
7037
|
`;
|
7038
7038
|
}
|
7039
|
-
|
7040
|
-
|
7039
|
+
const importRe = /\bimport\s*\(/;
|
7040
|
+
const internalImportName = "__artichokie_local_import__";
|
7041
7041
|
var FakeWorker = class {
|
7042
7042
|
/** @internal */
|
7043
7043
|
_fn;
|
@@ -8302,7 +8302,7 @@ function applySourcemapIgnoreList(map$1, sourcemapPath, sourcemapIgnoreList, log
|
|
8302
8302
|
async function extractSourcemapFromFile(code, filePath) {
|
8303
8303
|
const map$1 = (import_convert_source_map$2.fromSource(code) || await import_convert_source_map$2.fromMapFileSource(code, createConvertSourceMapReadMap(filePath)))?.toObject();
|
8304
8304
|
if (map$1) return {
|
8305
|
-
code: code.replace(import_convert_source_map$2.mapFileCommentRegex, blankReplacer),
|
8305
|
+
code: code.replace(import_convert_source_map$2.default.mapFileCommentRegex, blankReplacer),
|
8306
8306
|
map: map$1
|
8307
8307
|
};
|
8308
8308
|
}
|
@@ -10716,7 +10716,10 @@ async function computeEntries(environment) {
|
|
10716
10716
|
if (explicitEntryPatterns) entries = await globEntries(explicitEntryPatterns, environment);
|
10717
10717
|
else if (buildInput) {
|
10718
10718
|
const resolvePath = async (p$1) => {
|
10719
|
-
const id = (await environment.pluginContainer.resolveId(p$1, path.join(process.cwd(), "*"), {
|
10719
|
+
const id = (await environment.pluginContainer.resolveId(p$1, path.join(process.cwd(), "*"), {
|
10720
|
+
isEntry: true,
|
10721
|
+
scan: true
|
10722
|
+
}))?.id;
|
10720
10723
|
if (id === void 0) throw new Error(`failed to resolve rollupOptions.input value: ${JSON.stringify(p$1)}.`);
|
10721
10724
|
return id;
|
10722
10725
|
};
|
@@ -11856,7 +11859,7 @@ function resolvePlugin(resolveOptions) {
|
|
11856
11859
|
return ensureVersionQuery(res, id, options$1, depsOptimizer);
|
11857
11860
|
}
|
11858
11861
|
}
|
11859
|
-
if (id[0] === "." || (preferRelative || importer?.endsWith(".html")) && startsWithWordCharRE.test(id)) {
|
11862
|
+
if (id[0] === "." || (preferRelative || resolveOpts.isEntry || importer?.endsWith(".html")) && startsWithWordCharRE.test(id)) {
|
11860
11863
|
const basedir = importer ? path.dirname(importer) : process.cwd();
|
11861
11864
|
const fsPath = path.resolve(basedir, id);
|
11862
11865
|
const normalizedFsPath = normalizePath(fsPath);
|
@@ -12366,11 +12369,11 @@ function throwFileNotFoundInOptimizedDep(id) {
|
|
12366
12369
|
}
|
12367
12370
|
|
12368
12371
|
//#endregion
|
12369
|
-
//#region ../../node_modules/.pnpm/dotenv@
|
12370
|
-
var require_package = __commonJS({ "../../node_modules/.pnpm/dotenv@
|
12372
|
+
//#region ../../node_modules/.pnpm/dotenv@17.0.1/node_modules/dotenv/package.json
|
12373
|
+
var require_package = __commonJS({ "../../node_modules/.pnpm/dotenv@17.0.1/node_modules/dotenv/package.json"(exports, module) {
|
12371
12374
|
module.exports = {
|
12372
12375
|
"name": "dotenv",
|
12373
|
-
"version": "
|
12376
|
+
"version": "17.0.1",
|
12374
12377
|
"description": "Loads environment variables from .env file",
|
12375
12378
|
"main": "lib/main.js",
|
12376
12379
|
"types": "lib/main.d.ts",
|
@@ -12429,8 +12432,8 @@ var require_package = __commonJS({ "../../node_modules/.pnpm/dotenv@16.6.1/node_
|
|
12429
12432
|
} });
|
12430
12433
|
|
12431
12434
|
//#endregion
|
12432
|
-
//#region ../../node_modules/.pnpm/dotenv@
|
12433
|
-
var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@
|
12435
|
+
//#region ../../node_modules/.pnpm/dotenv@17.0.1/node_modules/dotenv/lib/main.js
|
12436
|
+
var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@17.0.1/node_modules/dotenv/lib/main.js"(exports, module) {
|
12434
12437
|
const fs$11 = require("fs");
|
12435
12438
|
const path$10 = require("path");
|
12436
12439
|
const os$3 = require("os");
|
@@ -12481,7 +12484,7 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.6.1/node_m
|
|
12481
12484
|
return DotenvModule.parse(decrypted);
|
12482
12485
|
}
|
12483
12486
|
function _warn(message) {
|
12484
|
-
console.
|
12487
|
+
console.error(`[dotenv@${version}][WARN] ${message}`);
|
12485
12488
|
}
|
12486
12489
|
function _debug(message) {
|
12487
12490
|
console.log(`[dotenv@${version}][DEBUG] ${message}`);
|
@@ -12544,7 +12547,7 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.6.1/node_m
|
|
12544
12547
|
}
|
12545
12548
|
function _configVault(options$1) {
|
12546
12549
|
const debug$19 = Boolean(options$1 && options$1.debug);
|
12547
|
-
const quiet = options$1 &&
|
12550
|
+
const quiet = Boolean(options$1 && options$1.quiet);
|
12548
12551
|
if (debug$19 || !quiet) _log("Loading env from encrypted .env.vault");
|
12549
12552
|
const parsed = DotenvModule._parseVault(options$1);
|
12550
12553
|
let processEnv = process.env;
|
@@ -12556,7 +12559,7 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.6.1/node_m
|
|
12556
12559
|
const dotenvPath = path$10.resolve(process.cwd(), ".env");
|
12557
12560
|
let encoding = "utf8";
|
12558
12561
|
const debug$19 = Boolean(options$1 && options$1.debug);
|
12559
|
-
const quiet = options$1 &&
|
12562
|
+
const quiet = Boolean(options$1 && options$1.quiet);
|
12560
12563
|
if (options$1 && options$1.encoding) encoding = options$1.encoding;
|
12561
12564
|
else if (debug$19) _debug("No encoding is specified. UTF-8 is used by default");
|
12562
12565
|
let optionPaths = [dotenvPath];
|
@@ -12576,9 +12579,9 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.6.1/node_m
|
|
12576
12579
|
}
|
12577
12580
|
let processEnv = process.env;
|
12578
12581
|
if (options$1 && options$1.processEnv != null) processEnv = options$1.processEnv;
|
12579
|
-
DotenvModule.populate(processEnv, parsedAll, options$1);
|
12582
|
+
const populated = DotenvModule.populate(processEnv, parsedAll, options$1);
|
12580
12583
|
if (debug$19 || !quiet) {
|
12581
|
-
const keysCount = Object.keys(
|
12584
|
+
const keysCount = Object.keys(populated).length;
|
12582
12585
|
const shortPaths = [];
|
12583
12586
|
for (const filePath of optionPaths) try {
|
12584
12587
|
const relative$3 = path$10.relative(process.cwd(), filePath);
|
@@ -12587,7 +12590,7 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.6.1/node_m
|
|
12587
12590
|
if (debug$19) _debug(`Failed to load ${filePath} ${e$1.message}`);
|
12588
12591
|
lastError = e$1;
|
12589
12592
|
}
|
12590
|
-
_log(`injecting env (${keysCount}) from ${shortPaths.join(",")}`);
|
12593
|
+
_log(`injecting env (${keysCount}) from ${shortPaths.join(",")} – [tip] encrypt with dotenvx: https://dotenvx.com`);
|
12591
12594
|
}
|
12592
12595
|
if (lastError) return {
|
12593
12596
|
parsed: parsedAll,
|
@@ -12632,16 +12635,24 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.6.1/node_m
|
|
12632
12635
|
function populate(processEnv, parsed, options$1 = {}) {
|
12633
12636
|
const debug$19 = Boolean(options$1 && options$1.debug);
|
12634
12637
|
const override = Boolean(options$1 && options$1.override);
|
12638
|
+
const populated = {};
|
12635
12639
|
if (typeof parsed !== "object") {
|
12636
12640
|
const err$2 = /* @__PURE__ */ new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
|
12637
12641
|
err$2.code = "OBJECT_REQUIRED";
|
12638
12642
|
throw err$2;
|
12639
12643
|
}
|
12640
12644
|
for (const key of Object.keys(parsed)) if (Object.prototype.hasOwnProperty.call(processEnv, key)) {
|
12641
|
-
if (override === true)
|
12645
|
+
if (override === true) {
|
12646
|
+
processEnv[key] = parsed[key];
|
12647
|
+
populated[key] = parsed[key];
|
12648
|
+
}
|
12642
12649
|
if (debug$19) if (override === true) _debug(`"${key}" is already defined and WAS overwritten`);
|
12643
12650
|
else _debug(`"${key}" is already defined and was NOT overwritten`);
|
12644
|
-
} else
|
12651
|
+
} else {
|
12652
|
+
processEnv[key] = parsed[key];
|
12653
|
+
populated[key] = parsed[key];
|
12654
|
+
}
|
12655
|
+
return populated;
|
12645
12656
|
}
|
12646
12657
|
const DotenvModule = {
|
12647
12658
|
configDotenv,
|
@@ -12879,7 +12890,7 @@ function errorMiddleware(server, allowNext = false) {
|
|
12879
12890
|
document.body.appendChild(h('pre', error.stack))
|
12880
12891
|
document.body.appendChild(h('p', '(Error overlay failed to load)'))
|
12881
12892
|
}
|
12882
|
-
|
12893
|
+
<\/script>
|
12883
12894
|
</head>
|
12884
12895
|
<body>
|
12885
12896
|
</body>
|
@@ -25893,7 +25904,7 @@ function send(req$4, res, content, type, options$1) {
|
|
25893
25904
|
if (type === "js" || type === "css") content = getCodeWithSourcemap(type, content.toString(), map$1);
|
25894
25905
|
} else if (type === "js" && (!map$1 || map$1.mappings !== "")) {
|
25895
25906
|
const code = content.toString();
|
25896
|
-
if (import_convert_source_map$1.mapFileCommentRegex.test(code)) debug$3?.(`Skipped injecting fallback sourcemap for ${req$4.url}`);
|
25907
|
+
if (import_convert_source_map$1.default.mapFileCommentRegex.test(code)) debug$3?.(`Skipped injecting fallback sourcemap for ${req$4.url}`);
|
25897
25908
|
else {
|
25898
25909
|
const urlWithoutTimestamp = removeTimestampQuery(req$4.url);
|
25899
25910
|
const ms = new MagicString(code);
|
@@ -27662,7 +27673,7 @@ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl
|
|
27662
27673
|
});
|
27663
27674
|
const modulePath = `${proxyModuleUrl}?html-proxy&index=${inlineModuleIndex}.${ext}`;
|
27664
27675
|
inlineModulePaths.push(modulePath);
|
27665
|
-
s$2.update(node.sourceCodeLocation.startOffset, node.sourceCodeLocation.endOffset, `<script type="module" src="${modulePath}"
|
27676
|
+
s$2.update(node.sourceCodeLocation.startOffset, node.sourceCodeLocation.endOffset, `<script type="module" src="${modulePath}"><\/script>`);
|
27666
27677
|
preTransformRequest(server, modulePath, decodedBase);
|
27667
27678
|
};
|
27668
27679
|
await traverseHtml(html, filename, (node) => {
|
@@ -29302,6 +29313,7 @@ const nonJsRe = /\.json(?:$|\?)/;
|
|
29302
29313
|
const isNonJsRequest = (request) => nonJsRe.test(request);
|
29303
29314
|
const importMetaEnvMarker = "__vite_import_meta_env__";
|
29304
29315
|
const importMetaEnvKeyReCache = /* @__PURE__ */ new Map();
|
29316
|
+
const escapedDotRE = /(?<!\\)\\./g;
|
29305
29317
|
function definePlugin(config$2) {
|
29306
29318
|
const isBuild = config$2.command === "build";
|
29307
29319
|
const isBuildLib = isBuild && config$2.build.lib;
|
@@ -29355,7 +29367,7 @@ function definePlugin(config$2) {
|
|
29355
29367
|
const patternKeys = Object.keys(userDefine);
|
29356
29368
|
if (!keepProcessEnv && Object.keys(processEnv).length) patternKeys.push("process.env");
|
29357
29369
|
if (Object.keys(importMetaKeys).length) patternKeys.push("import.meta.env", "import.meta.hot");
|
29358
|
-
const pattern = patternKeys.length ? new RegExp(patternKeys.map(escapeRegex).join("|")) : null;
|
29370
|
+
const pattern = patternKeys.length ? new RegExp(patternKeys.map((key) => escapeRegex(key).replaceAll(escapedDotRE, "\\??\\.")).join("|")) : null;
|
29359
29371
|
return [
|
29360
29372
|
define$1,
|
29361
29373
|
pattern,
|
@@ -30884,7 +30896,7 @@ function createFilterForTransform(idFilter, codeFilter, cwd) {
|
|
30884
30896
|
async function resolvePlugins(config$2, prePlugins, normalPlugins, postPlugins) {
|
30885
30897
|
const isBuild = config$2.command === "build";
|
30886
30898
|
const isWorker = config$2.isWorker;
|
30887
|
-
const buildPlugins = isBuild ? await (await import("./dep-
|
30899
|
+
const buildPlugins = isBuild ? await (await import("./dep-JtmpCfr0.js")).resolveBuildPlugins(config$2) : {
|
30888
30900
|
pre: [],
|
30889
30901
|
post: []
|
30890
30902
|
};
|
@@ -30987,19 +30999,19 @@ function getCachedFilterForPlugin(plugin, hookName) {
|
|
30987
30999
|
let filter$1;
|
30988
31000
|
switch (hookName) {
|
30989
31001
|
case "resolveId": {
|
30990
|
-
const rawFilter =
|
31002
|
+
const rawFilter = extractFilter(plugin.resolveId)?.id;
|
30991
31003
|
filters.resolveId = createIdFilter(rawFilter);
|
30992
31004
|
filter$1 = filters.resolveId;
|
30993
31005
|
break;
|
30994
31006
|
}
|
30995
31007
|
case "load": {
|
30996
|
-
const rawFilter =
|
31008
|
+
const rawFilter = extractFilter(plugin.load)?.id;
|
30997
31009
|
filters.load = createIdFilter(rawFilter);
|
30998
31010
|
filter$1 = filters.load;
|
30999
31011
|
break;
|
31000
31012
|
}
|
31001
31013
|
case "transform": {
|
31002
|
-
const rawFilters =
|
31014
|
+
const rawFilters = extractFilter(plugin.transform);
|
31003
31015
|
filters.transform = createFilterForTransform(rawFilters?.id, rawFilters?.code);
|
31004
31016
|
filter$1 = filters.transform;
|
31005
31017
|
break;
|
@@ -31007,6 +31019,9 @@ function getCachedFilterForPlugin(plugin, hookName) {
|
|
31007
31019
|
}
|
31008
31020
|
return filter$1;
|
31009
31021
|
}
|
31022
|
+
function extractFilter(hook) {
|
31023
|
+
return hook && "filter" in hook && hook.filter ? hook.filter : void 0;
|
31024
|
+
}
|
31010
31025
|
const viteAliasCustomResolver = async function(id, importer, options$1) {
|
31011
31026
|
const resolved = await this.resolve(id, importer, options$1);
|
31012
31027
|
return resolved || {
|
@@ -33450,6 +33465,13 @@ function preload(baseModule, deps, importerUrl) {
|
|
33450
33465
|
return baseModule().catch(handlePreloadError);
|
33451
33466
|
});
|
33452
33467
|
}
|
33468
|
+
function getPreloadCode(environment, renderBuiltUrlBoolean, isRelativeBase) {
|
33469
|
+
const { modulePreload } = environment.config.build;
|
33470
|
+
const scriptRel$1 = modulePreload && modulePreload.polyfill ? `'modulepreload'` : `/* @__PURE__ */ (${detectScriptRel.toString()})()`;
|
33471
|
+
const assetsURL$1 = renderBuiltUrlBoolean || isRelativeBase ? `function(dep, importerUrl) { return new URL(dep, importerUrl).href }` : `function(dep) { return ${JSON.stringify(environment.config.base)}+dep }`;
|
33472
|
+
const preloadCode = `const scriptRel = ${scriptRel$1};const assetsURL = ${assetsURL$1};const seen = {};export const ${preloadMethod} = ${preload.toString()}`;
|
33473
|
+
return preloadCode;
|
33474
|
+
}
|
33453
33475
|
/**
|
33454
33476
|
* Build only. During serve this is performed as part of ./importAnalysis.
|
33455
33477
|
*/
|
@@ -33464,10 +33486,7 @@ function buildImportAnalysisPlugin(config$2) {
|
|
33464
33486
|
} },
|
33465
33487
|
load: { handler(id) {
|
33466
33488
|
if (id === preloadHelperId) {
|
33467
|
-
const
|
33468
|
-
const scriptRel$1 = modulePreload && modulePreload.polyfill ? `'modulepreload'` : `/* @__PURE__ */ (${detectScriptRel.toString()})()`;
|
33469
|
-
const assetsURL$1 = renderBuiltUrl || isRelativeBase ? `function(dep, importerUrl) { return new URL(dep, importerUrl).href }` : `function(dep) { return ${JSON.stringify(config$2.base)}+dep }`;
|
33470
|
-
const preloadCode = `const scriptRel = ${scriptRel$1};const assetsURL = ${assetsURL$1};const seen = {};export const ${preloadMethod} = ${preload.toString()}`;
|
33489
|
+
const preloadCode = getPreloadCode(this.environment, !!renderBuiltUrl, isRelativeBase);
|
33471
33490
|
return {
|
33472
33491
|
code: preloadCode,
|
33473
33492
|
moduleSideEffects: false
|
@@ -33716,7 +33735,7 @@ function buildImportAnalysisPlugin(config$2) {
|
|
33716
33735
|
const originalDebugId = chunk.map.debugId;
|
33717
33736
|
chunk.map = map$1;
|
33718
33737
|
if (buildSourcemap === "inline") {
|
33719
|
-
chunk.code = chunk.code.replace(import_convert_source_map.mapFileCommentRegex, "");
|
33738
|
+
chunk.code = chunk.code.replace(import_convert_source_map.default.mapFileCommentRegex, "");
|
33720
33739
|
chunk.code += `\n//# sourceMappingURL=${genSourceMapUrl(map$1)}`;
|
33721
33740
|
} else {
|
33722
33741
|
if (originalDebugId) map$1.debugId = originalDebugId;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createRequire as ___createRequire } from 'module'; const require = ___createRequire(import.meta.url);
|
2
|
-
import { BuildEnvironment, build, buildEnvironmentOptionsDefaults, builderOptionsDefaults, createBuilder, createToImportMetaURLBasedRelativeRuntime, injectEnvironmentToHooks, onRollupLog, resolveBuildEnvironmentOptions, resolveBuildOutputs, resolveBuildPlugins, resolveBuilderOptions, resolveLibFilename, resolveUserExternal, toOutputFilePathInCss, toOutputFilePathInHtml, toOutputFilePathInJS, toOutputFilePathWithoutRuntime } from "./dep-
|
2
|
+
import { BuildEnvironment, build, buildEnvironmentOptionsDefaults, builderOptionsDefaults, createBuilder, createToImportMetaURLBasedRelativeRuntime, injectEnvironmentToHooks, onRollupLog, resolveBuildEnvironmentOptions, resolveBuildOutputs, resolveBuildPlugins, resolveBuilderOptions, resolveLibFilename, resolveUserExternal, toOutputFilePathInCss, toOutputFilePathInHtml, toOutputFilePathInJS, toOutputFilePathWithoutRuntime } from "./dep-DZ2tZksn.js";
|
3
3
|
import "./dep-Ctugieod.js";
|
4
4
|
|
5
5
|
export { createBuilder, resolveBuildPlugins };
|
package/dist/node/cli.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { createRequire as ___createRequire } from 'module'; const require = ___createRequire(import.meta.url);
|
2
2
|
import { __toESM } from "./chunks/dep-Drtntmtt.js";
|
3
|
-
import { createLogger, require_picocolors, resolveConfig } from "./chunks/dep-
|
3
|
+
import { createLogger, require_picocolors, resolveConfig } from "./chunks/dep-DZ2tZksn.js";
|
4
4
|
import { VERSION } from "./chunks/dep-Ctugieod.js";
|
5
5
|
import fs from "node:fs";
|
6
6
|
import path from "node:path";
|
@@ -568,7 +568,7 @@ const convertBase = (v) => {
|
|
568
568
|
cli.option("-c, --config <file>", `[string] use specified config file`).option("--base <path>", `[string] public base path (default: /)`, { type: [convertBase] }).option("-l, --logLevel <level>", `[string] info | warn | error | silent`).option("--clearScreen", `[boolean] allow/disable clear screen when logging`).option("--configLoader <loader>", `[string] use 'bundle' to bundle the config with esbuild, or 'runner' (experimental) to process it on the fly, or 'native' (experimental) to load using the native runtime (default: bundle)`).option("-d, --debug [feat]", `[string | boolean] show debug logs`).option("-f, --filter <filter>", `[string] filter debug logs`).option("-m, --mode <mode>", `[string] set env mode`);
|
569
569
|
cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--host [host]", `[string] specify hostname`, { type: [convertHost] }).option("--port <port>", `[number] specify port`).option("--open [path]", `[boolean | string] open browser on startup`).option("--cors", `[boolean] enable CORS`).option("--strictPort", `[boolean] exit if specified port is already in use`).option("--force", `[boolean] force the optimizer to ignore the cache and re-bundle`).action(async (root, options) => {
|
570
570
|
filterDuplicateOptions(options);
|
571
|
-
const { createServer } = await import("./chunks/dep-
|
571
|
+
const { createServer } = await import("./chunks/dep-C8ByWFY_.js");
|
572
572
|
try {
|
573
573
|
const server = await createServer({
|
574
574
|
root,
|
@@ -624,7 +624,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
|
|
624
624
|
});
|
625
625
|
cli.command("build [root]", "build for production").option("--target <target>", `[string] transpile target (default: 'baseline-widely-available')`).option("--outDir <dir>", `[string] output directory (default: dist)`).option("--assetsDir <dir>", `[string] directory under outDir to place assets in (default: assets)`).option("--assetsInlineLimit <number>", `[number] static asset base64 inline threshold in bytes (default: 4096)`).option("--ssr [entry]", `[string] build specified entry for server-side rendering`).option("--sourcemap [output]", `[boolean | "inline" | "hidden"] output source maps for build (default: false)`).option("--minify [minifier]", "[boolean | \"terser\" | \"esbuild\"] enable/disable minification, or specify minifier to use (default: esbuild)").option("--manifest [name]", `[boolean | string] emit build manifest json`).option("--ssrManifest [name]", `[boolean | string] emit ssr manifest json`).option("--emptyOutDir", `[boolean] force empty outDir when it's outside of root`).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--app", `[boolean] same as \`builder: {}\``).action(async (root, options) => {
|
626
626
|
filterDuplicateOptions(options);
|
627
|
-
const { createBuilder } = await import("./chunks/dep-
|
627
|
+
const { createBuilder } = await import("./chunks/dep-JtmpCfr0.js");
|
628
628
|
const buildOptions = cleanGlobalCLIOptions(cleanBuilderCLIOptions(options));
|
629
629
|
try {
|
630
630
|
const inlineConfig = {
|
@@ -649,7 +649,7 @@ cli.command("build [root]", "build for production").option("--target <target>",
|
|
649
649
|
});
|
650
650
|
cli.command("optimize [root]", "pre-bundle dependencies (deprecated, the pre-bundle process runs automatically and does not need to be called)").option("--force", `[boolean] force the optimizer to ignore the cache and re-bundle`).action(async (root, options) => {
|
651
651
|
filterDuplicateOptions(options);
|
652
|
-
const { optimizeDeps } = await import("./chunks/dep-
|
652
|
+
const { optimizeDeps } = await import("./chunks/dep-DDxIcCnt.js");
|
653
653
|
try {
|
654
654
|
const config = await resolveConfig({
|
655
655
|
root,
|
@@ -667,7 +667,7 @@ cli.command("optimize [root]", "pre-bundle dependencies (deprecated, the pre-bun
|
|
667
667
|
});
|
668
668
|
cli.command("preview [root]", "locally preview production build").option("--host [host]", `[string] specify hostname`, { type: [convertHost] }).option("--port <port>", `[number] specify port`).option("--strictPort", `[boolean] exit if specified port is already in use`).option("--open [path]", `[boolean | string] open browser on startup`).option("--outDir <dir>", `[string] output directory (default: dist)`).action(async (root, options) => {
|
669
669
|
filterDuplicateOptions(options);
|
670
|
-
const { preview } = await import("./chunks/dep-
|
670
|
+
const { preview } = await import("./chunks/dep-DFHPNLee.js");
|
671
671
|
try {
|
672
672
|
const server = await preview({
|
673
673
|
root,
|
package/dist/node/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createRequire as ___createRequire } from 'module'; const require = ___createRequire(import.meta.url);
|
2
|
-
import { BuildEnvironment, DevEnvironment, build, buildErrorMessage, createBuilder, createFilter, createIdResolver, createLogger, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, defineConfig, fetchModule, formatPostcssSourceMap, isCSSRequest, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, normalizePath, optimizeDeps, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rollupVersion, runnerImport, searchForWorkspaceRoot, send, sortUserPlugins, ssrTransform, transformWithEsbuild } from "./chunks/dep-
|
2
|
+
import { BuildEnvironment, DevEnvironment, build, buildErrorMessage, createBuilder, createFilter, createIdResolver, createLogger, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, defineConfig, fetchModule, formatPostcssSourceMap, isCSSRequest, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, normalizePath, optimizeDeps, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rollupVersion, runnerImport, searchForWorkspaceRoot, send, sortUserPlugins, ssrTransform, transformWithEsbuild } from "./chunks/dep-DZ2tZksn.js";
|
3
3
|
import { DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, VERSION, defaultAllowedOrigins } from "./chunks/dep-Ctugieod.js";
|
4
4
|
import { parseAst, parseAstAsync } from "rollup/parseAst";
|
5
5
|
import { version as esbuildVersion } from "esbuild";
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vite",
|
3
|
-
"version": "7.0.
|
3
|
+
"version": "7.0.4",
|
4
4
|
"type": "module",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": "Evan You",
|
@@ -80,10 +80,9 @@
|
|
80
80
|
},
|
81
81
|
"devDependencies": {
|
82
82
|
"@ampproject/remapping": "^2.3.0",
|
83
|
-
"@babel/parser": "^7.
|
84
|
-
"@jridgewell/trace-mapping": "^0.3.
|
85
|
-
"@oxc-project/
|
86
|
-
"@oxc-project/types": "^0.70.0",
|
83
|
+
"@babel/parser": "^7.28.0",
|
84
|
+
"@jridgewell/trace-mapping": "^0.3.29",
|
85
|
+
"@oxc-project/types": "0.75.1",
|
87
86
|
"@polka/compression": "^1.0.0-next.25",
|
88
87
|
"@rollup/plugin-alias": "^5.1.1",
|
89
88
|
"@rollup/plugin-commonjs": "^28.0.6",
|
@@ -91,7 +90,7 @@
|
|
91
90
|
"@rollup/pluginutils": "^5.2.0",
|
92
91
|
"@types/escape-html": "^1.0.4",
|
93
92
|
"@types/pnpapi": "^0.0.5",
|
94
|
-
"artichokie": "^0.3.
|
93
|
+
"artichokie": "^0.3.2",
|
95
94
|
"baseline-browser-mapping": "^2.4.4",
|
96
95
|
"cac": "^6.7.14",
|
97
96
|
"chokidar": "^3.6.0",
|
@@ -101,7 +100,7 @@
|
|
101
100
|
"cross-spawn": "^7.0.6",
|
102
101
|
"debug": "^4.4.1",
|
103
102
|
"dep-types": "link:./src/types",
|
104
|
-
"dotenv": "^
|
103
|
+
"dotenv": "^17.0.1",
|
105
104
|
"dotenv-expand": "^12.0.2",
|
106
105
|
"es-module-lexer": "^1.7.0",
|
107
106
|
"escape-html": "^1.0.3",
|
@@ -125,7 +124,7 @@
|
|
125
124
|
"postcss-modules": "^6.0.1",
|
126
125
|
"premove": "^4.0.0",
|
127
126
|
"resolve.exports": "^2.0.3",
|
128
|
-
"rolldown": "^1.0.0-beta.
|
127
|
+
"rolldown": "^1.0.0-beta.24",
|
129
128
|
"rolldown-plugin-dts": "^0.13.13",
|
130
129
|
"rollup-plugin-license": "^3.6.0",
|
131
130
|
"sass": "^1.89.2",
|