vite 5.4.8 → 5.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/README.md +4 -4
- package/dist/client/client.mjs +4 -4
- package/dist/node/chunks/{dep-B7_zXWZq.js → dep-Bs_uPLzU.js} +1 -1
- package/dist/node/chunks/{dep-CDnG8rE7.js → dep-Cyk9bIUq.js} +111 -65
- package/dist/node/chunks/{dep-BaJt-LTH.js → dep-D6390W8B.js} +1 -1
- package/dist/node/cli.js +5 -5
- package/dist/node/index.js +2 -2
- package/index.cjs +1 -1
- package/index.d.cts +1 -1
- package/package.json +4 -4
package/LICENSE.md
CHANGED
@@ -3,7 +3,7 @@ Vite is released under the MIT license:
|
|
3
3
|
|
4
4
|
MIT License
|
5
5
|
|
6
|
-
Copyright (c) 2019-present,
|
6
|
+
Copyright (c) 2019-present, VoidZero Inc. and Vite contributors
|
7
7
|
|
8
8
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
9
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
@@ -11,10 +11,10 @@
|
|
11
11
|
|
12
12
|
Vite (French word for "fast", pronounced `/vit/`) is a new breed of frontend build tool that significantly improves the frontend development experience. It consists of two major parts:
|
13
13
|
|
14
|
-
- A dev server that serves your source files over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), with [rich built-in features](https://
|
14
|
+
- A dev server that serves your source files over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), with [rich built-in features](https://vite.dev/guide/features.html) and astonishingly fast [Hot Module Replacement (HMR)](https://vite.dev/guide/features.html#hot-module-replacement).
|
15
15
|
|
16
|
-
- A [build command](https://
|
16
|
+
- A [build command](https://vite.dev/guide/build.html) that bundles your code with [Rollup](https://rollupjs.org), pre-configured to output highly optimized static assets for production.
|
17
17
|
|
18
|
-
In addition, Vite is highly extensible via its [Plugin API](https://
|
18
|
+
In addition, Vite is highly extensible via its [Plugin API](https://vite.dev/guide/api-plugin.html) and [JavaScript API](https://vite.dev/guide/api-javascript.html) with full typing support.
|
19
19
|
|
20
|
-
[Read the Docs to Learn More](https://
|
20
|
+
[Read the Docs to Learn More](https://vite.dev).
|
package/dist/client/client.mjs
CHANGED
@@ -513,14 +513,14 @@ try {
|
|
513
513
|
your current setup:
|
514
514
|
(browser) ${currentScriptHost} <--[HTTP]--> ${serverHost} (server)
|
515
515
|
(browser) ${socketHost} <--[WebSocket (failing)]--> ${directSocketHost} (server)
|
516
|
-
Check out your Vite / network configuration and https://
|
516
|
+
Check out your Vite / network configuration and https://vite.dev/config/server-options.html#server-hmr .`
|
517
517
|
);
|
518
518
|
});
|
519
519
|
socket.addEventListener(
|
520
520
|
"open",
|
521
521
|
() => {
|
522
522
|
console.info(
|
523
|
-
"[vite] Direct websocket connection fallback. Check out https://
|
523
|
+
"[vite] Direct websocket connection fallback. Check out https://vite.dev/config/server-options.html#server-hmr to remove the previous connection error."
|
524
524
|
);
|
525
525
|
},
|
526
526
|
{ once: true }
|
@@ -561,7 +561,7 @@ function setupWebSocket(protocol, hostAndPath, onCloseWithoutOpen) {
|
|
561
561
|
return socket2;
|
562
562
|
}
|
563
563
|
function cleanUrl(pathname) {
|
564
|
-
const url = new URL(pathname, "http://
|
564
|
+
const url = new URL(pathname, "http://vite.dev");
|
565
565
|
url.searchParams.delete("direct");
|
566
566
|
return url.pathname + url.search;
|
567
567
|
}
|
@@ -818,7 +818,7 @@ function injectQuery(url, queryToInject) {
|
|
818
818
|
return url;
|
819
819
|
}
|
820
820
|
const pathname = url.replace(/[?#].*$/, "");
|
821
|
-
const { search, hash } = new URL(url, "http://
|
821
|
+
const { search, hash } = new URL(url, "http://vite.dev");
|
822
822
|
return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ""}${hash || ""}`;
|
823
823
|
}
|
824
824
|
|
@@ -18221,13 +18221,35 @@ function isGlobMatch(filename, dir, patterns, allowJs) {
|
|
18221
18221
|
// filename must end with part of pattern that comes after last wildcard
|
18222
18222
|
let lastWildcardIndex = pattern.length;
|
18223
18223
|
let hasWildcard = false;
|
18224
|
+
let hasExtension = false;
|
18225
|
+
let hasSlash = false;
|
18226
|
+
let lastSlashIndex = -1;
|
18224
18227
|
for (let i = pattern.length - 1; i > -1; i--) {
|
18225
|
-
|
18226
|
-
|
18227
|
-
|
18228
|
+
const c = pattern[i];
|
18229
|
+
if (!hasWildcard) {
|
18230
|
+
if (c === '*' || c === '?') {
|
18231
|
+
lastWildcardIndex = i;
|
18232
|
+
hasWildcard = true;
|
18233
|
+
}
|
18234
|
+
}
|
18235
|
+
if (!hasSlash) {
|
18236
|
+
if (c === '.') {
|
18237
|
+
hasExtension = true;
|
18238
|
+
} else if (c === '/') {
|
18239
|
+
lastSlashIndex = i;
|
18240
|
+
hasSlash = true;
|
18241
|
+
}
|
18242
|
+
}
|
18243
|
+
if (hasWildcard && hasSlash) {
|
18228
18244
|
break;
|
18229
18245
|
}
|
18230
18246
|
}
|
18247
|
+
if (!hasExtension && (!hasWildcard || lastWildcardIndex < lastSlashIndex)) {
|
18248
|
+
// add implicit glob
|
18249
|
+
pattern += `${pattern.endsWith('/') ? '' : '/'}${GLOB_ALL_PATTERN}`;
|
18250
|
+
lastWildcardIndex = pattern.length - 1;
|
18251
|
+
hasWildcard = true;
|
18252
|
+
}
|
18231
18253
|
|
18232
18254
|
// if pattern does not end with wildcard, filename must end with pattern after last wildcard
|
18233
18255
|
if (
|
@@ -18265,11 +18287,18 @@ function isGlobMatch(filename, dir, patterns, allowJs) {
|
|
18265
18287
|
return false;
|
18266
18288
|
}
|
18267
18289
|
|
18268
|
-
// if no wildcard in pattern, filename must be equal to resolved pattern
|
18269
18290
|
if (!hasWildcard) {
|
18291
|
+
// no wildcard in pattern, filename must be equal to resolved pattern
|
18270
18292
|
return filename === resolvedPattern;
|
18293
|
+
} else if (
|
18294
|
+
firstWildcardIndex + GLOB_ALL_PATTERN.length ===
|
18295
|
+
resolvedPattern.length - (pattern.length - 1 - lastWildcardIndex) &&
|
18296
|
+
resolvedPattern.slice(firstWildcardIndex, firstWildcardIndex + GLOB_ALL_PATTERN.length) ===
|
18297
|
+
GLOB_ALL_PATTERN
|
18298
|
+
) {
|
18299
|
+
// singular glob-all pattern and we already validated prefix and suffix matches
|
18300
|
+
return true;
|
18271
18301
|
}
|
18272
|
-
|
18273
18302
|
// complex pattern, use regex to check it
|
18274
18303
|
if (PATTERN_REGEX_CACHE.has(resolvedPattern)) {
|
18275
18304
|
return PATTERN_REGEX_CACHE.get(resolvedPattern).test(filename);
|
@@ -20605,7 +20634,7 @@ function dataURIPlugin() {
|
|
20605
20634
|
resolved = /* @__PURE__ */ new Map();
|
20606
20635
|
},
|
20607
20636
|
resolveId(id) {
|
20608
|
-
if (!
|
20637
|
+
if (!id.trimStart().startsWith("data:")) {
|
20609
20638
|
return;
|
20610
20639
|
}
|
20611
20640
|
const uri = new URL$3(id);
|
@@ -36953,8 +36982,8 @@ function createCachedImport(imp) {
|
|
36953
36982
|
return cached;
|
36954
36983
|
};
|
36955
36984
|
}
|
36956
|
-
const importPostcssImport = createCachedImport(() => import('./dep-
|
36957
|
-
const importPostcssModules = createCachedImport(() => import('./dep-
|
36985
|
+
const importPostcssImport = createCachedImport(() => import('./dep-Bs_uPLzU.js').then(function (n) { return n.i; }));
|
36986
|
+
const importPostcssModules = createCachedImport(() => import('./dep-D6390W8B.js').then(function (n) { return n.i; }));
|
36958
36987
|
const importPostcss = createCachedImport(() => import('postcss'));
|
36959
36988
|
const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
|
36960
36989
|
let alwaysFakeWorkerWorkerControllerCache;
|
@@ -37963,7 +37992,10 @@ async function compileLightningCSS(id, src, config, urlReplacer) {
|
|
37963
37992
|
}
|
37964
37993
|
deps.add(dep.url);
|
37965
37994
|
if (urlReplacer) {
|
37966
|
-
const replaceUrl = await urlReplacer(
|
37995
|
+
const replaceUrl = await urlReplacer(
|
37996
|
+
dep.url,
|
37997
|
+
toAbsolute(dep.loc.filePath)
|
37998
|
+
);
|
37967
37999
|
css = css.replace(dep.placeholder, () => replaceUrl);
|
37968
38000
|
} else {
|
37969
38001
|
css = css.replace(dep.placeholder, () => dep.url);
|
@@ -45062,14 +45094,21 @@ var linux = {
|
|
45062
45094
|
codium: 'codium',
|
45063
45095
|
emacs: 'emacs',
|
45064
45096
|
gvim: 'gvim',
|
45097
|
+
idea: 'idea',
|
45065
45098
|
'idea.sh': 'idea',
|
45099
|
+
phpstorm: 'phpstorm',
|
45066
45100
|
'phpstorm.sh': 'phpstorm',
|
45101
|
+
pycharm: 'pycharm',
|
45067
45102
|
'pycharm.sh': 'pycharm',
|
45103
|
+
rubymine: 'rubymine',
|
45068
45104
|
'rubymine.sh': 'rubymine',
|
45069
45105
|
sublime_text: 'subl',
|
45070
45106
|
vim: 'vim',
|
45107
|
+
webstorm: 'webstorm',
|
45071
45108
|
'webstorm.sh': 'webstorm',
|
45109
|
+
goland: 'goland',
|
45072
45110
|
'goland.sh': 'goland',
|
45111
|
+
rider: 'rider',
|
45073
45112
|
'rider.sh': 'rider'
|
45074
45113
|
};
|
45075
45114
|
|
@@ -45379,36 +45418,6 @@ function launchEditor (file, specifiedEditor, onErrorCallback) {
|
|
45379
45418
|
fileName = path$5.relative('', fileName);
|
45380
45419
|
}
|
45381
45420
|
|
45382
|
-
// cmd.exe on Windows is vulnerable to RCE attacks given a file name of the
|
45383
|
-
// form "C:\Users\myusername\Downloads\& curl 172.21.93.52". Use a safe file
|
45384
|
-
// name pattern to validate user-provided file names. This doesn't cover the
|
45385
|
-
// entire range of valid file names but should cover almost all of them in practice.
|
45386
|
-
// (Backport of
|
45387
|
-
// https://github.com/facebook/create-react-app/pull/4866
|
45388
|
-
// and
|
45389
|
-
// https://github.com/facebook/create-react-app/pull/5431)
|
45390
|
-
|
45391
|
-
// Allows alphanumeric characters, periods, dashes, slashes, underscores, plus and space.
|
45392
|
-
const WINDOWS_CMD_SAFE_FILE_NAME_PATTERN = /^([A-Za-z]:[/\\])?[\p{L}0-9/.\-\\_+ ]+$/u;
|
45393
|
-
if (
|
45394
|
-
process.platform === 'win32' &&
|
45395
|
-
!WINDOWS_CMD_SAFE_FILE_NAME_PATTERN.test(fileName.trim())
|
45396
|
-
) {
|
45397
|
-
console.log();
|
45398
|
-
console.log(
|
45399
|
-
colors.red('Could not open ' + path$5.basename(fileName) + ' in the editor.')
|
45400
|
-
);
|
45401
|
-
console.log();
|
45402
|
-
console.log(
|
45403
|
-
'When running on Windows, file names are checked against a safe file name ' +
|
45404
|
-
'pattern to protect against remote code execution attacks. File names ' +
|
45405
|
-
'may consist only of alphanumeric characters (all languages), periods, ' +
|
45406
|
-
'dashes, slashes, and underscores.'
|
45407
|
-
);
|
45408
|
-
console.log();
|
45409
|
-
return
|
45410
|
-
}
|
45411
|
-
|
45412
45421
|
if (lineNumber) {
|
45413
45422
|
const extraArgs = getArgumentsForPosition(editor, fileName, lineNumber, columnNumber);
|
45414
45423
|
args.push.apply(args, extraArgs);
|
@@ -45424,13 +45433,55 @@ function launchEditor (file, specifiedEditor, onErrorCallback) {
|
|
45424
45433
|
}
|
45425
45434
|
|
45426
45435
|
if (process.platform === 'win32') {
|
45427
|
-
// On Windows,
|
45428
|
-
//
|
45429
|
-
|
45430
|
-
|
45431
|
-
|
45432
|
-
|
45433
|
-
|
45436
|
+
// On Windows, we need to use `exec` with the `shell: true` option,
|
45437
|
+
// and some more sanitization is required.
|
45438
|
+
|
45439
|
+
// However, CMD.exe on Windows is vulnerable to RCE attacks given a file name of the
|
45440
|
+
// form "C:\Users\myusername\Downloads\& curl 172.21.93.52".
|
45441
|
+
// `create-react-app` used a safe file name pattern to validate user-provided file names:
|
45442
|
+
// - https://github.com/facebook/create-react-app/pull/4866
|
45443
|
+
// - https://github.com/facebook/create-react-app/pull/5431
|
45444
|
+
// But that's not a viable solution for this package because
|
45445
|
+
// it's depended on by so many meta frameworks that heavily rely on
|
45446
|
+
// special characters in file names for filesystem-based routing.
|
45447
|
+
// We need to at least:
|
45448
|
+
// - Support `+` because it's used in SvelteKit and Vike
|
45449
|
+
// - Support `$` because it's used in Remix
|
45450
|
+
// - Support `(` and `)` because they are used in Analog, SolidStart, and Vike
|
45451
|
+
// - Support `@` because it's used in Vike
|
45452
|
+
// - Support `[` and `]` because they are widely used for [slug]
|
45453
|
+
// So here we choose to use `^` to escape special characters instead.
|
45454
|
+
|
45455
|
+
// According to https://ss64.com/nt/syntax-esc.html,
|
45456
|
+
// we can use `^` to escape `&`, `<`, `>`, `|`, `%`, and `^`
|
45457
|
+
// I'm not sure if we have to escape all of these, but let's do it anyway
|
45458
|
+
function escapeCmdArgs (cmdArgs) {
|
45459
|
+
return cmdArgs.replace(/([&|<>,;=^])/g, '^$1')
|
45460
|
+
}
|
45461
|
+
|
45462
|
+
// Need to double quote the editor path in case it contains spaces;
|
45463
|
+
// If the fileName contains spaces, we also need to double quote it in the arguments
|
45464
|
+
// However, there's a case that it's concatenated with line number and column number
|
45465
|
+
// which is separated by `:`. We need to double quote the whole string in this case.
|
45466
|
+
// Also, if the string contains the escape character `^`, it needs to be quoted, too.
|
45467
|
+
function doubleQuoteIfNeeded(str) {
|
45468
|
+
if (str.includes('^')) {
|
45469
|
+
// If a string includes an escaped character, not only does it need to be quoted,
|
45470
|
+
// but the quotes need to be escaped too.
|
45471
|
+
return `^"${str}^"`
|
45472
|
+
} else if (str.includes(' ')) {
|
45473
|
+
return `"${str}"`
|
45474
|
+
}
|
45475
|
+
return str
|
45476
|
+
}
|
45477
|
+
const launchCommand = [editor, ...args.map(escapeCmdArgs)]
|
45478
|
+
.map(doubleQuoteIfNeeded)
|
45479
|
+
.join(' ');
|
45480
|
+
|
45481
|
+
_childProcess = childProcess$1.exec(launchCommand, {
|
45482
|
+
stdio: 'inherit',
|
45483
|
+
shell: true
|
45484
|
+
});
|
45434
45485
|
} else {
|
45435
45486
|
_childProcess = childProcess$1.spawn(editor, args, { stdio: 'inherit' });
|
45436
45487
|
}
|
@@ -45554,7 +45605,7 @@ function setClientErrorHandler(server, logger) {
|
|
45554
45605
|
msg = "431 Request Header Fields Too Large";
|
45555
45606
|
logger.warn(
|
45556
45607
|
colors$1.yellow(
|
45557
|
-
"Server responded with status code 431. See https://
|
45608
|
+
"Server responded with status code 431. See https://vite.dev/guide/troubleshooting.html#_431-request-header-fields-too-large."
|
45558
45609
|
)
|
45559
45610
|
);
|
45560
45611
|
}
|
@@ -46169,7 +46220,7 @@ function resolvePlugin(resolveOptions) {
|
|
46169
46220
|
);
|
46170
46221
|
} else if (isProduction) {
|
46171
46222
|
this.warn(
|
46172
|
-
`Module "${id}" has been externalized for browser compatibility, imported by "${importer}". See https://
|
46223
|
+
`Module "${id}" has been externalized for browser compatibility, imported by "${importer}". See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`
|
46173
46224
|
);
|
46174
46225
|
}
|
46175
46226
|
return isProduction ? browserExternalId : `${browserExternalId}:${id}`;
|
@@ -46186,7 +46237,7 @@ function resolvePlugin(resolveOptions) {
|
|
46186
46237
|
id = id.slice(browserExternalId.length + 1);
|
46187
46238
|
return `export default new Proxy({}, {
|
46188
46239
|
get(_, key) {
|
46189
|
-
throw new Error(\`Module "${id}" has been externalized for browser compatibility. Cannot access "${id}.\${key}" in client code. See https://
|
46240
|
+
throw new Error(\`Module "${id}" has been externalized for browser compatibility. Cannot access "${id}.\${key}" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.\`)
|
46190
46241
|
}
|
46191
46242
|
})`;
|
46192
46243
|
}
|
@@ -46925,7 +46976,7 @@ function esbuildDepPlugin(qualified, external, config, ssr) {
|
|
46925
46976
|
key !== 'constructor' &&
|
46926
46977
|
key !== 'splice'
|
46927
46978
|
) {
|
46928
|
-
console.warn(\`Module "${path2}" has been externalized for browser compatibility. Cannot access "${path2}.\${key}" in client code. See https://
|
46979
|
+
console.warn(\`Module "${path2}" has been externalized for browser compatibility. Cannot access "${path2}.\${key}" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.\`)
|
46929
46980
|
}
|
46930
46981
|
}
|
46931
46982
|
}))`
|
@@ -47526,7 +47577,7 @@ const wasmFallbackPlugin = () => {
|
|
47526
47577
|
return;
|
47527
47578
|
}
|
47528
47579
|
throw new Error(
|
47529
|
-
'"ESM integration proposal for Wasm" is not supported currently. Use vite-plugin-wasm or other community plugins to handle this. Alternatively, you can use `.wasm?init` or `.wasm?url`. See https://
|
47580
|
+
'"ESM integration proposal for Wasm" is not supported currently. Use vite-plugin-wasm or other community plugins to handle this. Alternatively, you can use `.wasm?init` or `.wasm?url`. See https://vite.dev/guide/features.html#webassembly for more details.'
|
47530
47581
|
);
|
47531
47582
|
}
|
47532
47583
|
};
|
@@ -51672,7 +51723,7 @@ function ensureServingAccess(url, server, res, next) {
|
|
51672
51723
|
const hintMessage = `
|
51673
51724
|
${server.config.server.fs.allow.map((i) => `- ${i}`).join("\n")}
|
51674
51725
|
|
51675
|
-
Refer to docs https://
|
51726
|
+
Refer to docs https://vite.dev/config/server-options.html#server-fs-allow for configurations and more details.`;
|
51676
51727
|
server.config.logger.error(urlMessage);
|
51677
51728
|
server.config.logger.warnOnce(hintMessage + "\n");
|
51678
51729
|
res.statusCode = 403;
|
@@ -52513,18 +52564,13 @@ Object.defineProperty(${ssrModuleExportsKey}, "default", { enumerable: true, con
|
|
52513
52564
|
}
|
52514
52565
|
});
|
52515
52566
|
let map = s.generateMap({ hires: "boundary" });
|
52567
|
+
map.sources = [path$n.basename(url)];
|
52568
|
+
map.sourcesContent = [originalCode];
|
52516
52569
|
if (inMap && inMap.mappings && "sources" in inMap && inMap.sources.length > 0) {
|
52517
52570
|
map = combineSourcemaps(url, [
|
52518
|
-
|
52519
|
-
...map,
|
52520
|
-
sources: inMap.sources,
|
52521
|
-
sourcesContent: inMap.sourcesContent
|
52522
|
-
},
|
52571
|
+
map,
|
52523
52572
|
inMap
|
52524
52573
|
]);
|
52525
|
-
} else {
|
52526
|
-
map.sources = [path$n.basename(url)];
|
52527
|
-
map.sourcesContent = [originalCode];
|
52528
52574
|
}
|
52529
52575
|
return {
|
52530
52576
|
code: s.toString(),
|
@@ -62375,7 +62421,7 @@ class ModuleGraph {
|
|
62375
62421
|
mod.ssrError = null;
|
62376
62422
|
mod.importers.forEach((importer) => {
|
62377
62423
|
if (!importer.acceptedHmrDeps.has(mod)) {
|
62378
|
-
const shouldSoftInvalidateImporter = importer.staticImportedUrls?.has(mod.url) || softInvalidate;
|
62424
|
+
const shouldSoftInvalidateImporter = (importer.staticImportedUrls?.has(mod.url) || softInvalidate) && importer.type !== "css";
|
62379
62425
|
this.invalidateModule(
|
62380
62426
|
importer,
|
62381
62427
|
seen,
|
@@ -64451,7 +64497,7 @@ function __vite__injectQuery(url, queryToInject) {
|
|
64451
64497
|
return url;
|
64452
64498
|
}
|
64453
64499
|
const pathname = url.replace(/[?#].*$/, "");
|
64454
|
-
const { search, hash } = new URL(url, "http://
|
64500
|
+
const { search, hash } = new URL(url, "http://vite.dev");
|
64455
64501
|
return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ""}${hash || ""}`;
|
64456
64502
|
}
|
64457
64503
|
|
@@ -66431,7 +66477,7 @@ function resolveBaseUrl(base = "/", isBuild, logger) {
|
|
66431
66477
|
);
|
66432
66478
|
}
|
66433
66479
|
if (!isBuild || !isExternal) {
|
66434
|
-
base = new URL(base, "http://
|
66480
|
+
base = new URL(base, "http://vite.dev").pathname;
|
66435
66481
|
if (base[0] !== "/") {
|
66436
66482
|
base = "/" + base;
|
66437
66483
|
}
|
@@ -66574,7 +66620,7 @@ async function bundleConfigFile(fileName, isESM) {
|
|
66574
66620
|
throw new Error(
|
66575
66621
|
`Failed to resolve ${JSON.stringify(
|
66576
66622
|
id
|
66577
|
-
)}. This package is ESM only but it was tried to load by \`require\`. See https://
|
66623
|
+
)}. This package is ESM only but it was tried to load by \`require\`. See https://vite.dev/guide/troubleshooting.html#this-package-is-esm-only for more details.`
|
66578
66624
|
);
|
66579
66625
|
}
|
66580
66626
|
}
|
@@ -66587,7 +66633,7 @@ async function bundleConfigFile(fileName, isESM) {
|
|
66587
66633
|
throw new Error(
|
66588
66634
|
`${JSON.stringify(
|
66589
66635
|
id
|
66590
|
-
)} resolved to an ESM file. ESM file cannot be loaded by \`require\`. See https://
|
66636
|
+
)} resolved to an ESM file. ESM file cannot be loaded by \`require\`. See https://vite.dev/guide/troubleshooting.html#this-package-is-esm-only for more details.`
|
66591
66637
|
);
|
66592
66638
|
}
|
66593
66639
|
return {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-
|
1
|
+
import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-Cyk9bIUq.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-Cyk9bIUq.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-Cyk9bIUq.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-Cyk9bIUq.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-Cyk9bIUq.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-Cyk9bIUq.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-Cyk9bIUq.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-Cyk9bIUq.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
@@ -40,7 +40,7 @@ function warnCjsUsage() {
|
|
40
40
|
const yellow = (str) => `\u001b[33m${str}\u001b[39m`
|
41
41
|
console.warn(
|
42
42
|
yellow(
|
43
|
-
`The CJS build of Vite's Node API is deprecated. See https://
|
43
|
+
`The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.`,
|
44
44
|
),
|
45
45
|
)
|
46
46
|
if (process.env.VITE_CJS_TRACE) {
|
package/index.d.cts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @deprecated The CJS build of Vite's Node API is deprecated. See https://
|
2
|
+
* @deprecated The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
|
3
3
|
*/
|
4
4
|
declare const module: any
|
5
5
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vite",
|
3
|
-
"version": "5.4.
|
3
|
+
"version": "5.4.9",
|
4
4
|
"type": "module",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": "Evan You",
|
@@ -68,7 +68,7 @@
|
|
68
68
|
"bugs": {
|
69
69
|
"url": "https://github.com/vitejs/vite/issues"
|
70
70
|
},
|
71
|
-
"homepage": "https://
|
71
|
+
"homepage": "https://vite.dev",
|
72
72
|
"funding": "https://github.com/vitejs/vite?sponsor=1",
|
73
73
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
74
74
|
"dependencies": {
|
@@ -109,7 +109,7 @@
|
|
109
109
|
"etag": "^1.8.1",
|
110
110
|
"fast-glob": "^3.3.2",
|
111
111
|
"http-proxy": "^1.18.1",
|
112
|
-
"launch-editor-middleware": "^2.
|
112
|
+
"launch-editor-middleware": "^2.9.1",
|
113
113
|
"lightningcss": "^1.26.0",
|
114
114
|
"magic-string": "^0.30.11",
|
115
115
|
"micromatch": "^4.0.8",
|
@@ -134,7 +134,7 @@
|
|
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.
|
137
|
+
"tsconfck": "^3.1.4",
|
138
138
|
"tslib": "^2.7.0",
|
139
139
|
"types": "link:./types",
|
140
140
|
"ufo": "^1.5.4",
|