vite 6.2.3 → 6.2.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.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Q as commonjsGlobal, P as getDefaultExportFromCjs } from './dep-
|
1
|
+
import { Q as commonjsGlobal, P as getDefaultExportFromCjs } from './dep-DrOo5SEf.js';
|
2
2
|
import require$$0$2 from 'fs';
|
3
3
|
import require$$0 from 'postcss';
|
4
4
|
import require$$0$1 from 'path';
|
@@ -9769,10 +9769,10 @@ function removeImportQuery(url) {
|
|
9769
9769
|
function removeDirectQuery(url) {
|
9770
9770
|
return url.replace(directRequestRE$1, "$1").replace(trailingSeparatorRE, "");
|
9771
9771
|
}
|
9772
|
-
const urlRE = /(\?|&)url(?:&|$)/;
|
9773
|
-
const rawRE = /(\?|&)raw(?:&|$)/;
|
9772
|
+
const urlRE$1 = /(\?|&)url(?:&|$)/;
|
9773
|
+
const rawRE$1 = /(\?|&)raw(?:&|$)/;
|
9774
9774
|
function removeUrlQuery(url) {
|
9775
|
-
return url.replace(urlRE, "$1").replace(trailingSeparatorRE, "");
|
9775
|
+
return url.replace(urlRE$1, "$1").replace(trailingSeparatorRE, "");
|
9776
9776
|
}
|
9777
9777
|
function injectQuery(url, queryToInject) {
|
9778
9778
|
const { file, postfix } = splitFileAndPostfix(url);
|
@@ -13442,7 +13442,7 @@ function checkPublicFile(url, config) {
|
|
13442
13442
|
const assetUrlRE = /__VITE_ASSET__([\w$]+)__(?:\$_(.*?)__)?/g;
|
13443
13443
|
const jsSourceMapRE = /\.[cm]?js\.map$/;
|
13444
13444
|
const noInlineRE = /[?&]no-inline\b/;
|
13445
|
-
const inlineRE$
|
13445
|
+
const inlineRE$3 = /[?&]inline\b/;
|
13446
13446
|
const svgExtRE = /\.svg(?:$|\?)/;
|
13447
13447
|
const assetCache = /* @__PURE__ */ new WeakMap();
|
13448
13448
|
const cssEntriesMap = /* @__PURE__ */ new WeakMap();
|
@@ -13509,7 +13509,7 @@ function assetPlugin(config) {
|
|
13509
13509
|
cssEntriesMap.set(this.environment, /* @__PURE__ */ new Set());
|
13510
13510
|
},
|
13511
13511
|
resolveId(id) {
|
13512
|
-
if (!config.assetsInclude(cleanUrl(id)) && !urlRE.test(id)) {
|
13512
|
+
if (!config.assetsInclude(cleanUrl(id)) && !urlRE$1.test(id)) {
|
13513
13513
|
return;
|
13514
13514
|
}
|
13515
13515
|
const publicFile = checkPublicFile(id, config);
|
@@ -13521,14 +13521,14 @@ function assetPlugin(config) {
|
|
13521
13521
|
if (id[0] === "\0") {
|
13522
13522
|
return;
|
13523
13523
|
}
|
13524
|
-
if (rawRE.test(id)) {
|
13524
|
+
if (rawRE$1.test(id)) {
|
13525
13525
|
const file = checkPublicFile(id, config) || cleanUrl(id);
|
13526
13526
|
this.addWatchFile(file);
|
13527
13527
|
return `export default ${JSON.stringify(
|
13528
13528
|
await fsp.readFile(file, "utf-8")
|
13529
13529
|
)}`;
|
13530
13530
|
}
|
13531
|
-
if (!urlRE.test(id) && !config.assetsInclude(cleanUrl(id))) {
|
13531
|
+
if (!urlRE$1.test(id) && !config.assetsInclude(cleanUrl(id))) {
|
13532
13532
|
return;
|
13533
13533
|
}
|
13534
13534
|
id = removeUrlQuery(id);
|
@@ -13586,7 +13586,7 @@ async function fileToUrl$1(pluginContext, id) {
|
|
13586
13586
|
async function fileToDevUrl(environment, id, skipBase = false) {
|
13587
13587
|
const config = environment.getTopLevelConfig();
|
13588
13588
|
const publicFile = checkPublicFile(id, config);
|
13589
|
-
if (inlineRE$
|
13589
|
+
if (inlineRE$3.test(id)) {
|
13590
13590
|
const file = publicFile || cleanUrl(id);
|
13591
13591
|
const content = await fsp.readFile(file);
|
13592
13592
|
return assetToDataURL(environment, file, content);
|
@@ -13643,7 +13643,7 @@ async function fileToBuiltUrl(pluginContext, id, skipPublicCheck = false, forceI
|
|
13643
13643
|
if (!skipPublicCheck) {
|
13644
13644
|
const publicFile = checkPublicFile(id, topLevelConfig);
|
13645
13645
|
if (publicFile) {
|
13646
|
-
if (inlineRE$
|
13646
|
+
if (inlineRE$3.test(id)) {
|
13647
13647
|
id = publicFile;
|
13648
13648
|
} else {
|
13649
13649
|
return publicFileToBuiltUrl(id, topLevelConfig);
|
@@ -13692,7 +13692,7 @@ async function urlToBuiltUrl(pluginContext, url, importer, forceInline) {
|
|
13692
13692
|
}
|
13693
13693
|
function shouldInline(environment, file, id, content, buildPluginContext, forceInline) {
|
13694
13694
|
if (noInlineRE.test(id)) return false;
|
13695
|
-
if (inlineRE$
|
13695
|
+
if (inlineRE$3.test(id)) return true;
|
13696
13696
|
if (buildPluginContext) {
|
13697
13697
|
if (environment.config.build.lib) return true;
|
13698
13698
|
if (buildPluginContext.getModuleInfo(id)?.isEntry) return false;
|
@@ -15478,7 +15478,7 @@ function jsonPlugin(options, isBuild) {
|
|
15478
15478
|
transform(json, id) {
|
15479
15479
|
if (!jsonExtRE.test(id)) return null;
|
15480
15480
|
if (SPECIAL_QUERY_RE.test(id)) return null;
|
15481
|
-
if (inlineRE$
|
15481
|
+
if (inlineRE$3.test(id) || noInlineRE.test(id)) {
|
15482
15482
|
this.warn(
|
15483
15483
|
`
|
15484
15484
|
Using ?inline or ?no-inline for JSON imports will have no effect.
|
@@ -41016,7 +41016,7 @@ function servePublicMiddleware(server, publicFiles) {
|
|
41016
41016
|
};
|
41017
41017
|
return function viteServePublicMiddleware(req, res, next) {
|
41018
41018
|
if (publicFiles && !publicFiles.has(toFilePath(req.url)) || isImportRequest(req.url) || isInternalRequest(req.url) || // for `/public-file.js?url` to be transformed
|
41019
|
-
urlRE.test(req.url)) {
|
41019
|
+
urlRE$1.test(req.url)) {
|
41020
41020
|
return next();
|
41021
41021
|
}
|
41022
41022
|
serve(req, res, next);
|
@@ -42679,6 +42679,9 @@ function decodeURIIfPossible(input) {
|
|
42679
42679
|
const debugCache = createDebugger("vite:cache");
|
42680
42680
|
const knownIgnoreList = /* @__PURE__ */ new Set(["/", "/favicon.ico"]);
|
42681
42681
|
const trailingQuerySeparatorsRE = /[?&]+$/;
|
42682
|
+
const urlRE = /[?&]url\b/;
|
42683
|
+
const rawRE = /[?&]raw\b/;
|
42684
|
+
const inlineRE$2 = /[?&]inline\b/;
|
42682
42685
|
function cachedTransformMiddleware(server) {
|
42683
42686
|
return function viteCachedTransformMiddleware(req, res, next) {
|
42684
42687
|
const environment = server.environments.client;
|
@@ -42768,7 +42771,7 @@ function transformMiddleware(server) {
|
|
42768
42771
|
trailingQuerySeparatorsRE,
|
42769
42772
|
""
|
42770
42773
|
);
|
42771
|
-
if ((rawRE.test(urlWithoutTrailingQuerySeparators) || urlRE.test(urlWithoutTrailingQuerySeparators)) && !ensureServingAccess(
|
42774
|
+
if ((rawRE.test(urlWithoutTrailingQuerySeparators) || urlRE.test(urlWithoutTrailingQuerySeparators) || inlineRE$2.test(urlWithoutTrailingQuerySeparators)) && !ensureServingAccess(
|
42772
42775
|
urlWithoutTrailingQuerySeparators,
|
42773
42776
|
server,
|
42774
42777
|
res,
|
@@ -45659,7 +45662,7 @@ function webWorkerPlugin(config) {
|
|
45659
45662
|
url = injectQuery(url, `${WORKER_FILE_ID}&type=${workerType}`);
|
45660
45663
|
urlCode = JSON.stringify(url);
|
45661
45664
|
}
|
45662
|
-
if (urlRE.test(id)) {
|
45665
|
+
if (urlRE$1.test(id)) {
|
45663
45666
|
return {
|
45664
45667
|
code: `export default ${urlCode}`,
|
45665
45668
|
map: { mappings: "" }
|
@@ -46103,7 +46106,7 @@ function importAnalysisPlugin(config) {
|
|
46103
46106
|
if (specifier === clientPublicPath) {
|
46104
46107
|
return;
|
46105
46108
|
}
|
46106
|
-
if (specifier[0] === "/" && !(config.assetsInclude(cleanUrl(specifier)) || urlRE.test(specifier)) && checkPublicFile(specifier, config)) {
|
46109
|
+
if (specifier[0] === "/" && !(config.assetsInclude(cleanUrl(specifier)) || urlRE$1.test(specifier)) && checkPublicFile(specifier, config)) {
|
46107
46110
|
throw new Error(
|
46108
46111
|
`Cannot import non-asset file ${specifier} which is inside /public. JS/CSS files inside /public are copied as-is on build and can only be referenced via <script src> or <link href> in html. If you want to get the URL of that file, use ${injectQuery(
|
46109
46112
|
specifier,
|
@@ -47136,7 +47139,7 @@ function parseDynamicImportPattern(strings) {
|
|
47136
47139
|
let globParams = null;
|
47137
47140
|
if (search) {
|
47138
47141
|
search = "?" + search;
|
47139
|
-
if (workerOrSharedWorkerRE.test(search) || urlRE.test(search) || rawRE.test(search)) {
|
47142
|
+
if (workerOrSharedWorkerRE.test(search) || urlRE$1.test(search) || rawRE$1.test(search)) {
|
47140
47143
|
globParams = {
|
47141
47144
|
query: search,
|
47142
47145
|
import: "*"
|
@@ -48266,7 +48269,7 @@ function cssPlugin(config) {
|
|
48266
48269
|
},
|
48267
48270
|
async load(id) {
|
48268
48271
|
if (!isCSSRequest(id)) return;
|
48269
|
-
if (urlRE.test(id)) {
|
48272
|
+
if (urlRE$1.test(id)) {
|
48270
48273
|
if (isModuleCSSRequest(id)) {
|
48271
48274
|
throw new Error(
|
48272
48275
|
`?url is not supported with CSS modules. (tried to import ${JSON.stringify(
|
@@ -49240,8 +49243,8 @@ function createCachedImport(imp) {
|
|
49240
49243
|
return cached;
|
49241
49244
|
};
|
49242
49245
|
}
|
49243
|
-
const importPostcssImport = createCachedImport(() => import('./dep-
|
49244
|
-
const importPostcssModules = createCachedImport(() => import('./dep-
|
49246
|
+
const importPostcssImport = createCachedImport(() => import('./dep-DZlHsecg.js').then(function (n) { return n.i; }));
|
49247
|
+
const importPostcssModules = createCachedImport(() => import('./dep-DfJZxycY.js').then(function (n) { return n.i; }));
|
49245
49248
|
const importPostcss = createCachedImport(() => import('postcss'));
|
49246
49249
|
const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
|
49247
49250
|
let alwaysFakeWorkerWorkerControllerCache;
|
package/dist/node/cli.js
CHANGED
@@ -2,7 +2,7 @@ import path from 'node:path';
|
|
2
2
|
import fs__default from 'node:fs';
|
3
3
|
import { performance } from 'node:perf_hooks';
|
4
4
|
import { EventEmitter } from 'events';
|
5
|
-
import { O as colors, I as createLogger, r as resolveConfig } from './chunks/dep-
|
5
|
+
import { O as colors, I as createLogger, r as resolveConfig } from './chunks/dep-DrOo5SEf.js';
|
6
6
|
import { VERSION } from './constants.js';
|
7
7
|
import 'node:fs/promises';
|
8
8
|
import 'node:url';
|
@@ -745,7 +745,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
|
|
745
745
|
`[boolean] force the optimizer to ignore the cache and re-bundle`
|
746
746
|
).action(async (root, options) => {
|
747
747
|
filterDuplicateOptions(options);
|
748
|
-
const { createServer } = await import('./chunks/dep-
|
748
|
+
const { createServer } = await import('./chunks/dep-DrOo5SEf.js').then(function (n) { return n.S; });
|
749
749
|
try {
|
750
750
|
const server = await createServer({
|
751
751
|
root,
|
@@ -840,7 +840,7 @@ cli.command("build [root]", "build for production").option("--target <target>",
|
|
840
840
|
).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--app", `[boolean] same as \`builder: {}\``).action(
|
841
841
|
async (root, options) => {
|
842
842
|
filterDuplicateOptions(options);
|
843
|
-
const { createBuilder } = await import('./chunks/dep-
|
843
|
+
const { createBuilder } = await import('./chunks/dep-DrOo5SEf.js').then(function (n) { return n.T; });
|
844
844
|
const buildOptions = cleanGlobalCLIOptions(
|
845
845
|
cleanBuilderCLIOptions(options)
|
846
846
|
);
|
@@ -879,7 +879,7 @@ cli.command(
|
|
879
879
|
).action(
|
880
880
|
async (root, options) => {
|
881
881
|
filterDuplicateOptions(options);
|
882
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
882
|
+
const { optimizeDeps } = await import('./chunks/dep-DrOo5SEf.js').then(function (n) { return n.R; });
|
883
883
|
try {
|
884
884
|
const config = await resolveConfig(
|
885
885
|
{
|
@@ -906,7 +906,7 @@ ${e.stack}`),
|
|
906
906
|
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(
|
907
907
|
async (root, options) => {
|
908
908
|
filterDuplicateOptions(options);
|
909
|
-
const { preview } = await import('./chunks/dep-
|
909
|
+
const { preview } = await import('./chunks/dep-DrOo5SEf.js').then(function (n) { return n.U; });
|
910
910
|
try {
|
911
911
|
const server = await preview({
|
912
912
|
root,
|
package/dist/node/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export { parseAst, parseAstAsync } from 'rollup/parseAst';
|
2
|
-
import { a as arraify, i as isInNodeModules } from './chunks/dep-
|
3
|
-
export { B as BuildEnvironment, D as DevEnvironment, f as build, m as buildErrorMessage, g as createBuilder, F as createFilter, h as createIdResolver, I as createLogger, n as createRunnableDevEnvironment, c as createServer, y as createServerHotChannel, w as createServerModuleRunner, x as createServerModuleRunnerTransport, d as defineConfig, v as fetchModule, j as formatPostcssSourceMap, L as isFileLoadingAllowed, K as isFileServingAllowed, q as isRunnableDevEnvironment, l as loadConfigFromFile, M as loadEnv, E as mergeAlias, C as mergeConfig, z as moduleRunnerTransform, A as normalizePath, o as optimizeDeps, p as perEnvironmentPlugin, b as perEnvironmentState, k as preprocessCSS, e as preview, r as resolveConfig, N as resolveEnvPrefix, G as rollupVersion, u as runnerImport, J as searchForWorkspaceRoot, H as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
2
|
+
import { a as arraify, i as isInNodeModules } from './chunks/dep-DrOo5SEf.js';
|
3
|
+
export { B as BuildEnvironment, D as DevEnvironment, f as build, m as buildErrorMessage, g as createBuilder, F as createFilter, h as createIdResolver, I as createLogger, n as createRunnableDevEnvironment, c as createServer, y as createServerHotChannel, w as createServerModuleRunner, x as createServerModuleRunnerTransport, d as defineConfig, v as fetchModule, j as formatPostcssSourceMap, L as isFileLoadingAllowed, K as isFileServingAllowed, q as isRunnableDevEnvironment, l as loadConfigFromFile, M as loadEnv, E as mergeAlias, C as mergeConfig, z as moduleRunnerTransform, A as normalizePath, o as optimizeDeps, p as perEnvironmentPlugin, b as perEnvironmentState, k as preprocessCSS, e as preview, r as resolveConfig, N as resolveEnvPrefix, G as rollupVersion, u as runnerImport, J as searchForWorkspaceRoot, H as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-DrOo5SEf.js';
|
4
4
|
export { defaultAllowedOrigins, DEFAULT_CLIENT_CONDITIONS as defaultClientConditions, DEFAULT_CLIENT_MAIN_FIELDS as defaultClientMainFields, DEFAULT_SERVER_CONDITIONS as defaultServerConditions, DEFAULT_SERVER_MAIN_FIELDS as defaultServerMainFields, VERSION as version } from './constants.js';
|
5
5
|
export { version as esbuildVersion } from 'esbuild';
|
6
6
|
import 'node:fs';
|