vite 5.0.0-beta.6 → 5.0.0-beta.8
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 +17 -0
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-ce41d4ea.js → dep-0b82e789.js} +1 -1
- package/dist/node/chunks/{dep-c3c41c00.js → dep-3accc834.js} +1 -1
- package/dist/node/chunks/{dep-db07a1ea.js → dep-73034a1b.js} +763 -1811
- package/dist/node/cli.js +10 -10
- package/dist/node/index.d.ts +3247 -3474
- package/dist/node/index.js +6 -6
- package/index.cjs +0 -10
- package/package.json +11 -14
- package/types/hot.d.ts +4 -0
- package/types/import-meta.d.ts +5 -0
package/dist/node/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as isInNodeModules } from './chunks/dep-
|
|
2
|
-
export { b as build, e as buildErrorMessage,
|
|
1
|
+
import { i as isInNodeModules } from './chunks/dep-73034a1b.js';
|
|
2
|
+
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-73034a1b.js';
|
|
3
3
|
export { VERSION as version } from './constants.js';
|
|
4
4
|
export { version as esbuildVersion } from 'esbuild';
|
|
5
5
|
export { VERSION as rollupVersion } from 'rollup';
|
|
@@ -32,17 +32,17 @@ import 'module';
|
|
|
32
32
|
import 'node:assert';
|
|
33
33
|
import 'node:process';
|
|
34
34
|
import 'node:v8';
|
|
35
|
+
import 'querystring';
|
|
36
|
+
import 'node:readline';
|
|
37
|
+
import 'node:events';
|
|
35
38
|
import 'node:http';
|
|
36
39
|
import 'node:https';
|
|
37
40
|
import 'zlib';
|
|
38
41
|
import 'buffer';
|
|
39
42
|
import 'https';
|
|
40
43
|
import 'tls';
|
|
41
|
-
import 'worker_threads';
|
|
42
|
-
import 'querystring';
|
|
43
|
-
import 'node:readline';
|
|
44
|
-
import 'node:events';
|
|
45
44
|
import 'node:zlib';
|
|
45
|
+
import 'worker_threads';
|
|
46
46
|
|
|
47
47
|
// This file will be built for both ESM and CJS. Avoid relying on other modules as possible.
|
|
48
48
|
// copy from constants.ts
|
package/index.cjs
CHANGED
|
@@ -25,16 +25,6 @@ asyncFunctions.forEach((name) => {
|
|
|
25
25
|
import('./dist/node/index.js').then((i) => i[name](...args))
|
|
26
26
|
})
|
|
27
27
|
|
|
28
|
-
// some sync functions are marked not supported due to their complexity and uncommon usage
|
|
29
|
-
const unsupportedCJS = ['resolvePackageEntry', 'resolvePackageData']
|
|
30
|
-
unsupportedCJS.forEach((name) => {
|
|
31
|
-
module.exports[name] = () => {
|
|
32
|
-
throw new Error(
|
|
33
|
-
`"${name}" is not supported in CJS build of Vite 4.\nPlease use ESM or dynamic imports \`const { ${name} } = await import('vite')\`.`,
|
|
34
|
-
)
|
|
35
|
-
}
|
|
36
|
-
})
|
|
37
|
-
|
|
38
28
|
function warnCjsUsage() {
|
|
39
29
|
if (process.env.VITE_CJS_IGNORE_WARNING) return
|
|
40
30
|
globalThis.__vite_cjs_skip_clear_screen = true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -63,19 +63,17 @@
|
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"esbuild": "^0.19.3",
|
|
65
65
|
"postcss": "^8.4.31",
|
|
66
|
-
"rollup": "^3.29.
|
|
66
|
+
"rollup": "^3.29.4"
|
|
67
67
|
},
|
|
68
68
|
"optionalDependencies": {
|
|
69
69
|
"fsevents": "~2.3.3"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@ampproject/remapping": "^2.2.1",
|
|
73
|
-
"@babel/parser": "^7.23.0",
|
|
74
|
-
"@babel/types": "^7.23.0",
|
|
75
73
|
"@jridgewell/trace-mapping": "^0.3.19",
|
|
76
74
|
"@rollup/plugin-alias": "^5.0.1",
|
|
77
|
-
"@rollup/plugin-commonjs": "^25.0.
|
|
78
|
-
"@rollup/plugin-dynamic-import-vars": "^2.0.
|
|
75
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
76
|
+
"@rollup/plugin-dynamic-import-vars": "^2.0.7",
|
|
79
77
|
"@rollup/plugin-json": "^6.0.1",
|
|
80
78
|
"@rollup/plugin-node-resolve": "15.2.3",
|
|
81
79
|
"@rollup/plugin-typescript": "^11.1.5",
|
|
@@ -105,7 +103,7 @@
|
|
|
105
103
|
"json-stable-stringify": "^1.0.2",
|
|
106
104
|
"launch-editor-middleware": "^2.6.1",
|
|
107
105
|
"lightningcss": "^1.22.0",
|
|
108
|
-
"magic-string": "^0.30.
|
|
106
|
+
"magic-string": "^0.30.5",
|
|
109
107
|
"micromatch": "^4.0.5",
|
|
110
108
|
"mlly": "^1.4.2",
|
|
111
109
|
"mrmime": "^1.0.1",
|
|
@@ -119,12 +117,13 @@
|
|
|
119
117
|
"postcss-load-config": "^4.0.1",
|
|
120
118
|
"postcss-modules": "^6.0.0",
|
|
121
119
|
"resolve.exports": "^2.0.2",
|
|
122
|
-
"rollup-plugin-
|
|
120
|
+
"rollup-plugin-dts": "^6.1.0",
|
|
121
|
+
"rollup-plugin-license": "^3.2.0",
|
|
123
122
|
"sirv": "^2.0.3",
|
|
124
123
|
"source-map-support": "^0.5.21",
|
|
125
124
|
"strip-ansi": "^7.1.0",
|
|
126
125
|
"strip-literal": "^1.3.0",
|
|
127
|
-
"tsconfck": "^3.0.0
|
|
126
|
+
"tsconfck": "^3.0.0",
|
|
128
127
|
"tslib": "^2.6.2",
|
|
129
128
|
"types": "link:./types",
|
|
130
129
|
"ufo": "^1.3.1",
|
|
@@ -166,12 +165,10 @@
|
|
|
166
165
|
"dev": "rimraf dist && pnpm run build-bundle -w",
|
|
167
166
|
"build": "rimraf dist && run-s build-bundle build-types",
|
|
168
167
|
"build-bundle": "rollup --config rollup.config.ts --configPlugin typescript",
|
|
169
|
-
"build-types": "run-s build-types-temp build-types-
|
|
168
|
+
"build-types": "run-s build-types-temp build-types-roll build-types-check",
|
|
170
169
|
"build-types-temp": "tsc --emitDeclarationOnly --outDir temp/node -p src/node",
|
|
171
|
-
"build-types-
|
|
172
|
-
"build-types-
|
|
173
|
-
"build-types-post-patch": "tsx scripts/postPatchTypes.ts",
|
|
174
|
-
"build-types-check": "tsx scripts/checkBuiltTypes.ts && tsc --project tsconfig.check.json",
|
|
170
|
+
"build-types-roll": "rollup --config rollup.dts.config.ts --configPlugin typescript && rimraf temp",
|
|
171
|
+
"build-types-check": "tsc --project tsconfig.check.json",
|
|
175
172
|
"typecheck": "tsc --noEmit",
|
|
176
173
|
"lint": "eslint --cache --ext .ts src/**",
|
|
177
174
|
"format": "prettier --write --cache --parser typescript \"src/**/*.ts\""
|
package/types/hot.d.ts
CHANGED
|
@@ -28,5 +28,9 @@ export interface ViteHotContext {
|
|
|
28
28
|
event: T,
|
|
29
29
|
cb: (payload: InferCustomEventPayload<T>) => void,
|
|
30
30
|
): void
|
|
31
|
+
off<T extends string>(
|
|
32
|
+
event: T,
|
|
33
|
+
cb: (payload: InferCustomEventPayload<T>) => void,
|
|
34
|
+
): void
|
|
31
35
|
send<T extends string>(event: T, data?: InferCustomEventPayload<T>): void
|
|
32
36
|
}
|