vite 5.0.4 → 5.0.6
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 +22 -0
- package/client.d.ts +4 -1
- package/dist/client/client.mjs +198 -168
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-nbvvoiwS.js → dep-I1uDMLJL.js} +1 -1
- package/dist/node/chunks/{dep-GiiHpyM6.js → dep-Sacttr-6.js} +1 -1
- package/dist/node/chunks/{dep-4RECYSE1.js → dep-YJaePtkC.js} +286 -161
- package/dist/node/cli.js +6 -6
- package/dist/node/constants.js +1 -0
- package/dist/node/index.d.ts +2 -1
- package/dist/node/index.js +3 -3
- package/dist/node-cjs/publicUtils.cjs +2 -2
- package/package.json +6 -6
package/dist/node/cli.js
CHANGED
|
@@ -2,7 +2,7 @@ import path from 'node:path';
|
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import { performance } from 'node:perf_hooks';
|
|
4
4
|
import { EventEmitter } from 'events';
|
|
5
|
-
import { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-
|
|
5
|
+
import { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-YJaePtkC.js';
|
|
6
6
|
import { VERSION } from './constants.js';
|
|
7
7
|
import 'node:fs/promises';
|
|
8
8
|
import 'node:url';
|
|
@@ -27,11 +27,11 @@ import 'node:child_process';
|
|
|
27
27
|
import 'node:crypto';
|
|
28
28
|
import 'node:dns';
|
|
29
29
|
import 'crypto';
|
|
30
|
-
import 'node:buffer';
|
|
31
30
|
import 'module';
|
|
32
31
|
import 'node:assert';
|
|
33
32
|
import 'node:process';
|
|
34
33
|
import 'node:v8';
|
|
34
|
+
import 'node:buffer';
|
|
35
35
|
import 'rollup';
|
|
36
36
|
import 'rollup/parseAst';
|
|
37
37
|
import 'querystring';
|
|
@@ -759,7 +759,7 @@ cli
|
|
|
759
759
|
filterDuplicateOptions(options);
|
|
760
760
|
// output structure is preserved even after bundling so require()
|
|
761
761
|
// is ok here
|
|
762
|
-
const { createServer } = await import('./chunks/dep-
|
|
762
|
+
const { createServer } = await import('./chunks/dep-YJaePtkC.js').then(function (n) { return n.A; });
|
|
763
763
|
try {
|
|
764
764
|
const server = await createServer({
|
|
765
765
|
root,
|
|
@@ -839,7 +839,7 @@ cli
|
|
|
839
839
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
840
840
|
.action(async (root, options) => {
|
|
841
841
|
filterDuplicateOptions(options);
|
|
842
|
-
const { build } = await import('./chunks/dep-
|
|
842
|
+
const { build } = await import('./chunks/dep-YJaePtkC.js').then(function (n) { return n.C; });
|
|
843
843
|
const buildOptions = cleanOptions(options);
|
|
844
844
|
try {
|
|
845
845
|
await build({
|
|
@@ -867,7 +867,7 @@ cli
|
|
|
867
867
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
868
868
|
.action(async (root, options) => {
|
|
869
869
|
filterDuplicateOptions(options);
|
|
870
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
|
870
|
+
const { optimizeDeps } = await import('./chunks/dep-YJaePtkC.js').then(function (n) { return n.B; });
|
|
871
871
|
try {
|
|
872
872
|
const config = await resolveConfig({
|
|
873
873
|
root,
|
|
@@ -893,7 +893,7 @@ cli
|
|
|
893
893
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
|
894
894
|
.action(async (root, options) => {
|
|
895
895
|
filterDuplicateOptions(options);
|
|
896
|
-
const { preview } = await import('./chunks/dep-
|
|
896
|
+
const { preview } = await import('./chunks/dep-YJaePtkC.js').then(function (n) { return n.D; });
|
|
897
897
|
try {
|
|
898
898
|
const server = await preview({
|
|
899
899
|
root,
|
package/dist/node/constants.js
CHANGED
package/dist/node/index.d.ts
CHANGED
|
@@ -754,13 +754,14 @@ type BindCLIShortcutsOptions<Server = ViteDevServer | PreviewServer> = {
|
|
|
754
754
|
/**
|
|
755
755
|
* Custom shortcuts to run when a key is pressed. These shortcuts take priority
|
|
756
756
|
* over the default shortcuts if they have the same keys (except the `h` key).
|
|
757
|
+
* To disable a default shortcut, define the same key but with `action: undefined`.
|
|
757
758
|
*/
|
|
758
759
|
customShortcuts?: CLIShortcut<Server>[];
|
|
759
760
|
};
|
|
760
761
|
type CLIShortcut<Server = ViteDevServer | PreviewServer> = {
|
|
761
762
|
key: string;
|
|
762
763
|
description: string;
|
|
763
|
-
action(server: Server): void | Promise<void>;
|
|
764
|
+
action?(server: Server): void | Promise<void>;
|
|
764
765
|
};
|
|
765
766
|
|
|
766
767
|
interface TransformResult {
|
package/dist/node/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { parseAst, parseAstAsync } from 'rollup/parseAst';
|
|
2
|
-
import { i as isInNodeModules } from './chunks/dep-
|
|
3
|
-
export { b as build, e as buildErrorMessage, h as createFilter, k as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, u as isFileServingAllowed, l as loadConfigFromFile, v as loadEnv, g as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, r as resolveConfig, w as resolveEnvPrefix, q as searchForWorkspaceRoot, j as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
|
2
|
+
import { i as isInNodeModules } from './chunks/dep-YJaePtkC.js';
|
|
3
|
+
export { b as build, e as buildErrorMessage, h as createFilter, k as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, u as isFileServingAllowed, l as loadConfigFromFile, v as loadEnv, g as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, r as resolveConfig, w as resolveEnvPrefix, q as searchForWorkspaceRoot, j as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-YJaePtkC.js';
|
|
4
4
|
export { VERSION as version } from './constants.js';
|
|
5
5
|
export { version as esbuildVersion } from 'esbuild';
|
|
6
6
|
export { VERSION as rollupVersion } from 'rollup';
|
|
@@ -30,11 +30,11 @@ import 'node:child_process';
|
|
|
30
30
|
import 'node:crypto';
|
|
31
31
|
import 'node:dns';
|
|
32
32
|
import 'crypto';
|
|
33
|
-
import 'node:buffer';
|
|
34
33
|
import 'module';
|
|
35
34
|
import 'node:assert';
|
|
36
35
|
import 'node:process';
|
|
37
36
|
import 'node:v8';
|
|
37
|
+
import 'node:buffer';
|
|
38
38
|
import 'querystring';
|
|
39
39
|
import 'node:readline';
|
|
40
40
|
import 'node:events';
|
|
@@ -3412,7 +3412,7 @@ function normalizePath(id) {
|
|
|
3412
3412
|
}
|
|
3413
3413
|
function fsPathFromId(id) {
|
|
3414
3414
|
const fsPath = normalizePath(id.startsWith(FS_PREFIX) ? id.slice(FS_PREFIX.length) : id);
|
|
3415
|
-
return fsPath[0] === '/' ||
|
|
3415
|
+
return fsPath[0] === '/' || VOLUME_RE.test(fsPath) ? fsPath : `/${fsPath}`;
|
|
3416
3416
|
}
|
|
3417
3417
|
function fsPathFromUrl(url) {
|
|
3418
3418
|
return fsPathFromId(cleanUrl(url));
|
|
@@ -6061,7 +6061,7 @@ function loadEnv(mode, envDir, prefixes = 'VITE_') {
|
|
|
6061
6061
|
}
|
|
6062
6062
|
function resolveEnvPrefix({ envPrefix = 'VITE_', }) {
|
|
6063
6063
|
envPrefix = arraify(envPrefix);
|
|
6064
|
-
if (envPrefix.
|
|
6064
|
+
if (envPrefix.includes('')) {
|
|
6065
6065
|
throw new Error(`envPrefix option contains value '', which could lead unexpected exposure of sensitive information.`);
|
|
6066
6066
|
}
|
|
6067
6067
|
return envPrefix;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"bugs": {
|
|
58
58
|
"url": "https://github.com/vitejs/vite/issues"
|
|
59
59
|
},
|
|
60
|
-
"homepage": "https://
|
|
60
|
+
"homepage": "https://vitejs.dev",
|
|
61
61
|
"funding": "https://github.com/vitejs/vite?sponsor=1",
|
|
62
62
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"esbuild": "^0.19.3",
|
|
65
|
-
"postcss": "^8.4.
|
|
65
|
+
"postcss": "^8.4.32",
|
|
66
66
|
"rollup": "^4.2.0"
|
|
67
67
|
},
|
|
68
68
|
"optionalDependencies": {
|
|
@@ -70,15 +70,15 @@
|
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@ampproject/remapping": "^2.2.1",
|
|
73
|
-
"@babel/parser": "^7.23.
|
|
73
|
+
"@babel/parser": "^7.23.5",
|
|
74
74
|
"@jridgewell/trace-mapping": "^0.3.20",
|
|
75
75
|
"@rollup/plugin-alias": "^5.1.0",
|
|
76
76
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
77
|
-
"@rollup/plugin-dynamic-import-vars": "^2.1.
|
|
77
|
+
"@rollup/plugin-dynamic-import-vars": "^2.1.2",
|
|
78
78
|
"@rollup/plugin-json": "^6.0.1",
|
|
79
79
|
"@rollup/plugin-node-resolve": "15.2.3",
|
|
80
80
|
"@rollup/plugin-typescript": "^11.1.5",
|
|
81
|
-
"@rollup/pluginutils": "^5.0
|
|
81
|
+
"@rollup/pluginutils": "^5.1.0",
|
|
82
82
|
"@types/escape-html": "^1.0.4",
|
|
83
83
|
"@types/pnpapi": "^0.0.5",
|
|
84
84
|
"acorn": "^8.11.2",
|