vite 5.4.2 → 5.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
- package/dist/node/chunks/{dep-BzOvws4Y.js → dep-BaOMuo4I.js} +72 -38
- package/dist/node/chunks/{dep-B8yndt7W.js → dep-DlM3pmpg.js} +1 -1
- package/dist/node/chunks/{dep-CHbHjMYU.js → dep-DmgIY-c5.js} +1 -1
- package/dist/node/cli.js +5 -5
- package/dist/node/index.js +2 -2
- package/index.cjs +27 -2
- package/package.json +6 -6
@@ -18326,8 +18326,8 @@ function pattern2regex(resolvedPattern, allowJs) {
|
|
18326
18326
|
function replaceTokens(tsconfig, configDir) {
|
18327
18327
|
return JSON.parse(
|
18328
18328
|
JSON.stringify(tsconfig)
|
18329
|
-
// replace ${configDir}
|
18330
|
-
.replaceAll(/"
|
18329
|
+
// replace ${configDir}
|
18330
|
+
.replaceAll(/"\${configDir}/g, `"${native2posix(configDir)}`)
|
18331
18331
|
);
|
18332
18332
|
}
|
18333
18333
|
|
@@ -18921,7 +18921,7 @@ function rebaseRelative(key, value, prependPath) {
|
|
18921
18921
|
* @returns {string}
|
18922
18922
|
*/
|
18923
18923
|
function rebasePath(value, prependPath) {
|
18924
|
-
if (path$n.isAbsolute(value)) {
|
18924
|
+
if (path$n.isAbsolute(value) || value.startsWith('${configDir}')) {
|
18925
18925
|
return value;
|
18926
18926
|
} else {
|
18927
18927
|
// relative paths use posix syntax in tsconfig
|
@@ -20306,7 +20306,8 @@ function assetPlugin(config) {
|
|
20306
20306
|
code: `export default ${JSON.stringify(encodeURIPath(url))}`,
|
20307
20307
|
// Force rollup to keep this module from being shared between other entry points if it's an entrypoint.
|
20308
20308
|
// If the resulting chunk is empty, it will be removed in generateBundle.
|
20309
|
-
moduleSideEffects: config.command === "build" && this.getModuleInfo(id)?.isEntry ? "no-treeshake" : false
|
20309
|
+
moduleSideEffects: config.command === "build" && this.getModuleInfo(id)?.isEntry ? "no-treeshake" : false,
|
20310
|
+
meta: config.command === "build" ? { "vite:asset": true } : void 0
|
20310
20311
|
};
|
20311
20312
|
},
|
20312
20313
|
renderChunk(code, chunk, opts) {
|
@@ -20323,7 +20324,7 @@ function assetPlugin(config) {
|
|
20323
20324
|
generateBundle(_, bundle) {
|
20324
20325
|
for (const file in bundle) {
|
20325
20326
|
const chunk = bundle[file];
|
20326
|
-
if (chunk.type === "chunk" && chunk.isEntry && chunk.moduleIds.length === 1 && config.assetsInclude(chunk.moduleIds[0])) {
|
20327
|
+
if (chunk.type === "chunk" && chunk.isEntry && chunk.moduleIds.length === 1 && config.assetsInclude(chunk.moduleIds[0]) && this.getModuleInfo(chunk.moduleIds[0])?.meta["vite:asset"]) {
|
20327
20328
|
delete bundle[file];
|
20328
20329
|
}
|
20329
20330
|
}
|
@@ -22768,7 +22769,12 @@ const util = require$$0$5;
|
|
22768
22769
|
const braces$1 = braces_1;
|
22769
22770
|
const picomatch$2 = picomatch$3;
|
22770
22771
|
const utils$b = utils$k;
|
22771
|
-
|
22772
|
+
|
22773
|
+
const isEmptyString = v => v === '' || v === './';
|
22774
|
+
const hasBraces = v => {
|
22775
|
+
const index = v.indexOf('{');
|
22776
|
+
return index > -1 && v.indexOf('}', index) > -1;
|
22777
|
+
};
|
22772
22778
|
|
22773
22779
|
/**
|
22774
22780
|
* Returns an array of strings that match one or more glob patterns.
|
@@ -23209,7 +23215,7 @@ micromatch$1.parse = (patterns, options) => {
|
|
23209
23215
|
|
23210
23216
|
micromatch$1.braces = (pattern, options) => {
|
23211
23217
|
if (typeof pattern !== 'string') throw new TypeError('Expected a string');
|
23212
|
-
if ((options && options.nobrace === true) ||
|
23218
|
+
if ((options && options.nobrace === true) || !hasBraces(pattern)) {
|
23213
23219
|
return [pattern];
|
23214
23220
|
}
|
23215
23221
|
return braces$1(pattern, options);
|
@@ -23228,6 +23234,8 @@ micromatch$1.braceExpand = (pattern, options) => {
|
|
23228
23234
|
* Expose micromatch
|
23229
23235
|
*/
|
23230
23236
|
|
23237
|
+
// exposed for tests
|
23238
|
+
micromatch$1.hasBraces = hasBraces;
|
23231
23239
|
var micromatch_1 = micromatch$1;
|
23232
23240
|
|
23233
23241
|
var micromatch$2 = /*@__PURE__*/getDefaultExportFromCjs(micromatch_1);
|
@@ -35041,6 +35049,9 @@ function nodeIsElement(node) {
|
|
35041
35049
|
return node.nodeName[0] !== "#";
|
35042
35050
|
}
|
35043
35051
|
function traverseNodes(node, visitor) {
|
35052
|
+
if (node.nodeName === "template") {
|
35053
|
+
node = node.content;
|
35054
|
+
}
|
35044
35055
|
visitor(node);
|
35045
35056
|
if (nodeIsElement(node) || node.nodeName === "#document" || node.nodeName === "#document-fragment") {
|
35046
35057
|
node.childNodes.forEach((childNode) => traverseNodes(childNode, visitor));
|
@@ -36633,14 +36644,23 @@ function createCSSResolvers(config) {
|
|
36633
36644
|
}));
|
36634
36645
|
},
|
36635
36646
|
get sass() {
|
36636
|
-
|
36637
|
-
|
36638
|
-
|
36639
|
-
|
36640
|
-
|
36641
|
-
|
36642
|
-
|
36643
|
-
|
36647
|
+
if (!sassResolve) {
|
36648
|
+
const resolver = config.createResolver({
|
36649
|
+
extensions: [".scss", ".sass", ".css"],
|
36650
|
+
mainFields: ["sass", "style"],
|
36651
|
+
conditions: ["sass", "style"],
|
36652
|
+
tryIndex: true,
|
36653
|
+
tryPrefix: "_",
|
36654
|
+
preferRelative: true
|
36655
|
+
});
|
36656
|
+
sassResolve = async (...args) => {
|
36657
|
+
if (args[0].startsWith("file://")) {
|
36658
|
+
args[0] = fileURLToPath(args[0]);
|
36659
|
+
}
|
36660
|
+
return resolver(...args);
|
36661
|
+
};
|
36662
|
+
}
|
36663
|
+
return sassResolve;
|
36644
36664
|
},
|
36645
36665
|
get less() {
|
36646
36666
|
return lessResolve || (lessResolve = config.createResolver({
|
@@ -36933,8 +36953,8 @@ function createCachedImport(imp) {
|
|
36933
36953
|
return cached;
|
36934
36954
|
};
|
36935
36955
|
}
|
36936
|
-
const importPostcssImport = createCachedImport(() => import('./dep-
|
36937
|
-
const importPostcssModules = createCachedImport(() => import('./dep-
|
36956
|
+
const importPostcssImport = createCachedImport(() => import('./dep-DmgIY-c5.js').then(function (n) { return n.i; }));
|
36957
|
+
const importPostcssModules = createCachedImport(() => import('./dep-DlM3pmpg.js').then(function (n) { return n.i; }));
|
36938
36958
|
const importPostcss = createCachedImport(() => import('postcss'));
|
36939
36959
|
const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
|
36940
36960
|
let alwaysFakeWorkerWorkerControllerCache;
|
@@ -37281,7 +37301,7 @@ function fixScssBugImportValue(data) {
|
|
37281
37301
|
}
|
37282
37302
|
return data;
|
37283
37303
|
}
|
37284
|
-
const makeScssWorker = (resolvers, alias, maxWorkers) => {
|
37304
|
+
const makeScssWorker = (resolvers, alias, maxWorkers, packageName) => {
|
37285
37305
|
const internalImporter = async (url, importer, filename) => {
|
37286
37306
|
importer = cleanScssBugUrl(importer);
|
37287
37307
|
const resolved = await resolvers.sass(url, importer);
|
@@ -37294,6 +37314,9 @@ const makeScssWorker = (resolvers, alias, maxWorkers) => {
|
|
37294
37314
|
"$",
|
37295
37315
|
resolvers.sass
|
37296
37316
|
);
|
37317
|
+
if (packageName === "sass-embedded") {
|
37318
|
+
return data;
|
37319
|
+
}
|
37297
37320
|
return fixScssBugImportValue(data);
|
37298
37321
|
} catch (data) {
|
37299
37322
|
return data;
|
@@ -37490,7 +37513,12 @@ const scssProcessor = (maxWorkers) => {
|
|
37490
37513
|
if (!workerMap.has(options.alias)) {
|
37491
37514
|
workerMap.set(
|
37492
37515
|
options.alias,
|
37493
|
-
api === "modern-compiler" ? makeModernCompilerScssWorker(resolvers, options.alias) : api === "modern" ? makeModernScssWorker(resolvers, options.alias, maxWorkers) : makeScssWorker(
|
37516
|
+
api === "modern-compiler" ? makeModernCompilerScssWorker(resolvers, options.alias) : api === "modern" ? makeModernScssWorker(resolvers, options.alias, maxWorkers) : makeScssWorker(
|
37517
|
+
resolvers,
|
37518
|
+
options.alias,
|
37519
|
+
maxWorkers,
|
37520
|
+
sassPackage.name
|
37521
|
+
)
|
37494
37522
|
);
|
37495
37523
|
}
|
37496
37524
|
const worker = workerMap.get(options.alias);
|
@@ -37512,6 +37540,11 @@ const scssProcessor = (maxWorkers) => {
|
|
37512
37540
|
);
|
37513
37541
|
const deps = result.stats.includedFiles.map((f) => cleanScssBugUrl(f));
|
37514
37542
|
const map2 = result.map ? JSON.parse(result.map.toString()) : void 0;
|
37543
|
+
if (map2) {
|
37544
|
+
map2.sources = map2.sources.map(
|
37545
|
+
(url) => url.startsWith("file://") ? normalizePath$3(fileURLToPath(url)) : url
|
37546
|
+
);
|
37547
|
+
}
|
37515
37548
|
return {
|
37516
37549
|
code: result.css.toString(),
|
37517
37550
|
map: map2,
|
@@ -51531,7 +51564,8 @@ function servePublicMiddleware(server, publicFiles) {
|
|
51531
51564
|
return normalizePath$3(filePath);
|
51532
51565
|
};
|
51533
51566
|
return function viteServePublicMiddleware(req, res, next) {
|
51534
|
-
if (publicFiles && !publicFiles.has(toFilePath(req.url)) || isImportRequest(req.url) || isInternalRequest(req.url)
|
51567
|
+
if (publicFiles && !publicFiles.has(toFilePath(req.url)) || isImportRequest(req.url) || isInternalRequest(req.url) || // for `/public-file.js?url` to be transformed
|
51568
|
+
urlRE.test(req.url)) {
|
51535
51569
|
return next();
|
51536
51570
|
}
|
51537
51571
|
serve(req, res, next);
|
@@ -54268,14 +54302,14 @@ Use --emptyOutDir to override.
|
|
54268
54302
|
}
|
54269
54303
|
return true;
|
54270
54304
|
}
|
54271
|
-
function resolveChokidarOptions(
|
54305
|
+
function resolveChokidarOptions(options, resolvedOutDirs, emptyOutDir, cacheDir) {
|
54272
54306
|
const { ignored: ignoredList, ...otherOptions } = options ?? {};
|
54273
54307
|
const ignored = [
|
54274
54308
|
"**/.git/**",
|
54275
54309
|
"**/node_modules/**",
|
54276
54310
|
"**/test-results/**",
|
54277
54311
|
// Playwright
|
54278
|
-
glob.escapePath(
|
54312
|
+
glob.escapePath(cacheDir) + "/**",
|
54279
54313
|
...arraify(ignoredList || [])
|
54280
54314
|
];
|
54281
54315
|
if (emptyOutDir) {
|
@@ -62666,13 +62700,13 @@ async function _createServer(inlineConfig = {}, options) {
|
|
62666
62700
|
resolvedOutDirs
|
62667
62701
|
);
|
62668
62702
|
const resolvedWatchOptions = resolveChokidarOptions(
|
62669
|
-
config,
|
62670
62703
|
{
|
62671
62704
|
disableGlobbing: true,
|
62672
62705
|
...serverConfig.watch
|
62673
62706
|
},
|
62674
62707
|
resolvedOutDirs,
|
62675
|
-
emptyOutDir
|
62708
|
+
emptyOutDir,
|
62709
|
+
config.cacheDir
|
62676
62710
|
);
|
62677
62711
|
const middlewares = connect$1();
|
62678
62712
|
const httpServer = middlewareMode ? null : await resolveHttpServer(serverConfig, middlewares, httpsOptions);
|
@@ -63246,14 +63280,14 @@ function setupOnCrawlEnd(onCrawlEnd) {
|
|
63246
63280
|
if (ignoredId) {
|
63247
63281
|
seenIds.add(ignoredId);
|
63248
63282
|
markIdAsDone(ignoredId);
|
63283
|
+
} else {
|
63284
|
+
checkIfCrawlEndAfterTimeout();
|
63249
63285
|
}
|
63250
63286
|
return onCrawlEndPromiseWithResolvers.promise;
|
63251
63287
|
}
|
63252
63288
|
function markIdAsDone(id) {
|
63253
|
-
|
63254
|
-
|
63255
|
-
checkIfCrawlEndAfterTimeout();
|
63256
|
-
}
|
63289
|
+
registeredIds.delete(id);
|
63290
|
+
checkIfCrawlEndAfterTimeout();
|
63257
63291
|
}
|
63258
63292
|
function checkIfCrawlEndAfterTimeout() {
|
63259
63293
|
if (cancelled || registeredIds.size > 0) return;
|
@@ -64457,8 +64491,8 @@ function preload(baseModule, deps, importerUrl) {
|
|
64457
64491
|
link.rel = isCss ? "stylesheet" : scriptRel;
|
64458
64492
|
if (!isCss) {
|
64459
64493
|
link.as = "script";
|
64460
|
-
link.crossOrigin = "";
|
64461
64494
|
}
|
64495
|
+
link.crossOrigin = "";
|
64462
64496
|
link.href = dep;
|
64463
64497
|
if (cspNonce) {
|
64464
64498
|
link.setAttribute("nonce", cspNonce);
|
@@ -65129,7 +65163,7 @@ async function build(inlineConfig = {}) {
|
|
65129
65163
|
"production"
|
65130
65164
|
);
|
65131
65165
|
const options = config.build;
|
65132
|
-
const { logger } = config;
|
65166
|
+
const { root, logger, packageCache } = config;
|
65133
65167
|
const ssr = !!options.ssr;
|
65134
65168
|
const libOptions = options.lib;
|
65135
65169
|
logger.info(
|
@@ -65139,7 +65173,7 @@ async function build(inlineConfig = {}) {
|
|
65139
65173
|
)}`
|
65140
65174
|
)
|
65141
65175
|
);
|
65142
|
-
const resolve = (p) => path$n.resolve(
|
65176
|
+
const resolve = (p) => path$n.resolve(root, p);
|
65143
65177
|
const input = libOptions ? options.rollupOptions?.input || (typeof libOptions.entry === "string" ? resolve(libOptions.entry) : Array.isArray(libOptions.entry) ? libOptions.entry.map(resolve) : Object.fromEntries(
|
65144
65178
|
Object.entries(libOptions.entry).map(([alias, file]) => [
|
65145
65179
|
alias,
|
@@ -65240,7 +65274,7 @@ ${stackOnly}`;
|
|
65240
65274
|
const format = output.format || "es";
|
65241
65275
|
const jsExt = ssrNodeBuild || libOptions ? resolveOutputJsExtension(
|
65242
65276
|
format,
|
65243
|
-
findNearestPackageData(
|
65277
|
+
findNearestPackageData(root, packageCache)?.data.type
|
65244
65278
|
) : "js";
|
65245
65279
|
return {
|
65246
65280
|
dir: outDir,
|
@@ -65258,9 +65292,9 @@ ${stackOnly}`;
|
|
65258
65292
|
libOptions,
|
65259
65293
|
format,
|
65260
65294
|
name,
|
65261
|
-
|
65295
|
+
root,
|
65262
65296
|
jsExt,
|
65263
|
-
|
65297
|
+
packageCache
|
65264
65298
|
) : path$n.posix.join(options.assetsDir, `[name]-[hash].${jsExt}`),
|
65265
65299
|
chunkFileNames: libOptions ? `[name]-[hash].${jsExt}` : path$n.posix.join(options.assetsDir, `[name]-[hash].${jsExt}`),
|
65266
65300
|
assetFileNames: libOptions ? `[name].[ext]` : path$n.posix.join(options.assetsDir, `[name]-[hash].[ext]`),
|
@@ -65282,13 +65316,13 @@ ${stackOnly}`;
|
|
65282
65316
|
normalizedOutputs.push(buildOutputOptions(outputs));
|
65283
65317
|
}
|
65284
65318
|
const resolvedOutDirs = getResolvedOutDirs(
|
65285
|
-
|
65319
|
+
root,
|
65286
65320
|
options.outDir,
|
65287
65321
|
options.rollupOptions?.output
|
65288
65322
|
);
|
65289
65323
|
const emptyOutDir = resolveEmptyOutDir(
|
65290
65324
|
options.emptyOutDir,
|
65291
|
-
|
65325
|
+
root,
|
65292
65326
|
resolvedOutDirs,
|
65293
65327
|
logger
|
65294
65328
|
);
|
@@ -65296,10 +65330,10 @@ ${stackOnly}`;
|
|
65296
65330
|
logger.info(colors$1.cyan(`
|
65297
65331
|
watching for file changes...`));
|
65298
65332
|
const resolvedChokidarOptions = resolveChokidarOptions(
|
65299
|
-
config,
|
65300
65333
|
config.build.watch.chokidar,
|
65301
65334
|
resolvedOutDirs,
|
65302
|
-
emptyOutDir
|
65335
|
+
emptyOutDir,
|
65336
|
+
config.cacheDir
|
65303
65337
|
);
|
65304
65338
|
const { watch } = await import('rollup');
|
65305
65339
|
const watcher = watch({
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-
|
1
|
+
import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-BaOMuo4I.js';
|
2
2
|
import require$$0__default from 'fs';
|
3
3
|
import require$$0 from 'postcss';
|
4
4
|
import require$$0$1 from 'path';
|
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 { A as colors, v as createLogger, r as resolveConfig } from './chunks/dep-
|
5
|
+
import { A as colors, v as createLogger, r as resolveConfig } from './chunks/dep-BaOMuo4I.js';
|
6
6
|
import { VERSION } from './constants.js';
|
7
7
|
import 'node:fs/promises';
|
8
8
|
import 'node:url';
|
@@ -730,7 +730,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
|
|
730
730
|
`[boolean] force the optimizer to ignore the cache and re-bundle`
|
731
731
|
).action(async (root, options) => {
|
732
732
|
filterDuplicateOptions(options);
|
733
|
-
const { createServer } = await import('./chunks/dep-
|
733
|
+
const { createServer } = await import('./chunks/dep-BaOMuo4I.js').then(function (n) { return n.E; });
|
734
734
|
try {
|
735
735
|
const server = await createServer({
|
736
736
|
root,
|
@@ -822,7 +822,7 @@ cli.command("build [root]", "build for production").option("--target <target>",
|
|
822
822
|
`[boolean] force empty outDir when it's outside of root`
|
823
823
|
).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).action(async (root, options) => {
|
824
824
|
filterDuplicateOptions(options);
|
825
|
-
const { build } = await import('./chunks/dep-
|
825
|
+
const { build } = await import('./chunks/dep-BaOMuo4I.js').then(function (n) { return n.F; });
|
826
826
|
const buildOptions = cleanOptions(options);
|
827
827
|
try {
|
828
828
|
await build({
|
@@ -851,7 +851,7 @@ cli.command("optimize [root]", "pre-bundle dependencies").option(
|
|
851
851
|
).action(
|
852
852
|
async (root, options) => {
|
853
853
|
filterDuplicateOptions(options);
|
854
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
854
|
+
const { optimizeDeps } = await import('./chunks/dep-BaOMuo4I.js').then(function (n) { return n.D; });
|
855
855
|
try {
|
856
856
|
const config = await resolveConfig(
|
857
857
|
{
|
@@ -877,7 +877,7 @@ ${e.stack}`),
|
|
877
877
|
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(
|
878
878
|
async (root, options) => {
|
879
879
|
filterDuplicateOptions(options);
|
880
|
-
const { preview } = await import('./chunks/dep-
|
880
|
+
const { preview } = await import('./chunks/dep-BaOMuo4I.js').then(function (n) { return n.G; });
|
881
881
|
try {
|
882
882
|
const server = await preview({
|
883
883
|
root,
|
package/dist/node/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export { parseAst, parseAstAsync } from 'rollup/parseAst';
|
2
|
-
import { i as isInNodeModules, a as arraify } from './chunks/dep-
|
3
|
-
export { b as build, g as buildErrorMessage, k as createFilter, v as createLogger, c as createServer, d as defineConfig, h as fetchModule, f as formatPostcssSourceMap, x as isFileServingAllowed, l as loadConfigFromFile, y as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, z as resolveEnvPrefix, q as rollupVersion, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
2
|
+
import { i as isInNodeModules, a as arraify } from './chunks/dep-BaOMuo4I.js';
|
3
|
+
export { b as build, g as buildErrorMessage, k as createFilter, v as createLogger, c as createServer, d as defineConfig, h as fetchModule, f as formatPostcssSourceMap, x as isFileServingAllowed, l as loadConfigFromFile, y as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, z as resolveEnvPrefix, q as rollupVersion, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-BaOMuo4I.js';
|
4
4
|
export { VERSION as version } from './constants.js';
|
5
5
|
export { version as esbuildVersion } from 'esbuild';
|
6
6
|
import { existsSync, readFileSync } from 'node:fs';
|
package/index.cjs
CHANGED
@@ -25,11 +25,36 @@ asyncFunctions.forEach((name) => {
|
|
25
25
|
|
26
26
|
function warnCjsUsage() {
|
27
27
|
if (process.env.VITE_CJS_IGNORE_WARNING) return
|
28
|
+
const logLevelIndex = process.argv.findIndex((arg) =>
|
29
|
+
/^(?:-l|--logLevel)/.test(arg),
|
30
|
+
)
|
31
|
+
if (logLevelIndex > 0) {
|
32
|
+
const logLevelValue = process.argv[logLevelIndex + 1]
|
33
|
+
if (logLevelValue === 'silent' || logLevelValue === 'error') {
|
34
|
+
return
|
35
|
+
}
|
36
|
+
if (/silent|error/.test(process.argv[logLevelIndex])) {
|
37
|
+
return
|
38
|
+
}
|
39
|
+
}
|
28
40
|
const yellow = (str) => `\u001b[33m${str}\u001b[39m`
|
29
|
-
|
30
|
-
log(
|
41
|
+
console.warn(
|
31
42
|
yellow(
|
32
43
|
`The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.`,
|
33
44
|
),
|
34
45
|
)
|
46
|
+
if (process.env.VITE_CJS_TRACE) {
|
47
|
+
const e = {}
|
48
|
+
const stackTraceLimit = Error.stackTraceLimit
|
49
|
+
Error.stackTraceLimit = 100
|
50
|
+
Error.captureStackTrace(e)
|
51
|
+
Error.stackTraceLimit = stackTraceLimit
|
52
|
+
console.log(
|
53
|
+
e.stack
|
54
|
+
.split('\n')
|
55
|
+
.slice(1)
|
56
|
+
.filter((line) => !line.includes('(node:'))
|
57
|
+
.join('\n'),
|
58
|
+
)
|
59
|
+
}
|
35
60
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vite",
|
3
|
-
"version": "5.4.
|
3
|
+
"version": "5.4.3",
|
4
4
|
"type": "module",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": "Evan You",
|
@@ -73,7 +73,7 @@
|
|
73
73
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
74
74
|
"dependencies": {
|
75
75
|
"esbuild": "^0.21.3",
|
76
|
-
"postcss": "^8.4.
|
76
|
+
"postcss": "^8.4.43",
|
77
77
|
"rollup": "^4.20.0"
|
78
78
|
},
|
79
79
|
"optionalDependencies": {
|
@@ -81,7 +81,7 @@
|
|
81
81
|
},
|
82
82
|
"devDependencies": {
|
83
83
|
"@ampproject/remapping": "^2.3.0",
|
84
|
-
"@babel/parser": "^7.25.
|
84
|
+
"@babel/parser": "^7.25.6",
|
85
85
|
"@jridgewell/trace-mapping": "^0.3.25",
|
86
86
|
"@polka/compression": "^1.0.0-next.25",
|
87
87
|
"@rollup/plugin-alias": "^5.1.0",
|
@@ -112,7 +112,7 @@
|
|
112
112
|
"launch-editor-middleware": "^2.8.1",
|
113
113
|
"lightningcss": "^1.26.0",
|
114
114
|
"magic-string": "^0.30.11",
|
115
|
-
"micromatch": "^4.0.
|
115
|
+
"micromatch": "^4.0.8",
|
116
116
|
"mlly": "^1.7.1",
|
117
117
|
"mrmime": "^2.0.0",
|
118
118
|
"open": "^8.4.2",
|
@@ -134,8 +134,8 @@
|
|
134
134
|
"source-map-support": "^0.5.21",
|
135
135
|
"strip-ansi": "^7.1.0",
|
136
136
|
"strip-literal": "^2.1.0",
|
137
|
-
"tsconfck": "^3.1.
|
138
|
-
"tslib": "^2.
|
137
|
+
"tsconfck": "^3.1.3",
|
138
|
+
"tslib": "^2.7.0",
|
139
139
|
"types": "link:./types",
|
140
140
|
"ufo": "^1.5.4",
|
141
141
|
"ws": "^8.18.0"
|