vite 6.2.4 → 6.3.0-beta.1
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 +0 -58
- package/dist/client/client.mjs +1 -1
- package/dist/node/chunks/{dep-DrOo5SEf.js → dep-CY3sqczG.js} +14224 -18865
- package/dist/node/chunks/{dep-DfJZxycY.js → dep-DPsCJVuU.js} +1 -1
- package/dist/node/chunks/{dep-DZlHsecg.js → dep-W4lxOTyg.js} +1 -1
- package/dist/node/cli.js +7 -5
- package/dist/node/index.d.ts +41 -11
- package/dist/node/index.js +43 -3
- package/dist/node/module-runner.js +1 -1
- package/dist/node-cjs/publicUtils.cjs +387 -2767
- package/index.cjs +2 -0
- package/package.json +8 -8
- package/types/customEvent.d.ts +6 -1
- package/types/hot.d.ts +7 -4
- package/types/importMeta.d.ts +10 -1
- package/types/metadata.d.ts +25 -0
package/index.cjs
CHANGED
@@ -48,6 +48,8 @@ const disallowedVariables = [
|
|
48
48
|
'createServerModuleRunner',
|
49
49
|
'createServerModuleRunnerTransport',
|
50
50
|
'isRunnableDevEnvironment',
|
51
|
+
'createFetchableDevEnvironment',
|
52
|
+
'isFetchableDevEnvironment',
|
51
53
|
]
|
52
54
|
disallowedVariables.forEach((name) => {
|
53
55
|
Object.defineProperty(module.exports, name, {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vite",
|
3
|
-
"version": "6.
|
3
|
+
"version": "6.3.0-beta.1",
|
4
4
|
"type": "module",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": "Evan You",
|
@@ -73,22 +73,24 @@
|
|
73
73
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
74
74
|
"dependencies": {
|
75
75
|
"esbuild": "^0.25.0",
|
76
|
+
"picomatch": "^4.0.2",
|
76
77
|
"postcss": "^8.5.3",
|
77
|
-
"rollup": "^4.
|
78
|
+
"rollup": "^4.34.9",
|
79
|
+
"tinyglobby": "^0.2.12"
|
78
80
|
},
|
79
81
|
"optionalDependencies": {
|
80
82
|
"fsevents": "~2.3.3"
|
81
83
|
},
|
82
84
|
"devDependencies": {
|
83
85
|
"@ampproject/remapping": "^2.3.0",
|
84
|
-
"@babel/parser": "^7.26.
|
86
|
+
"@babel/parser": "^7.26.10",
|
85
87
|
"@jridgewell/trace-mapping": "^0.3.25",
|
86
88
|
"@polka/compression": "^1.0.0-next.25",
|
87
89
|
"@rollup/plugin-alias": "^5.1.1",
|
88
90
|
"@rollup/plugin-commonjs": "^28.0.3",
|
89
91
|
"@rollup/plugin-dynamic-import-vars": "2.1.4",
|
90
92
|
"@rollup/plugin-json": "^6.1.0",
|
91
|
-
"@rollup/plugin-node-resolve": "16.0.
|
93
|
+
"@rollup/plugin-node-resolve": "16.0.1",
|
92
94
|
"@rollup/pluginutils": "^5.1.4",
|
93
95
|
"@types/escape-html": "^1.0.4",
|
94
96
|
"@types/pnpapi": "^0.0.5",
|
@@ -109,17 +111,16 @@
|
|
109
111
|
"etag": "^1.8.1",
|
110
112
|
"http-proxy": "^1.18.1",
|
111
113
|
"launch-editor-middleware": "^2.10.0",
|
112
|
-
"lightningcss": "^1.29.
|
114
|
+
"lightningcss": "^1.29.3",
|
113
115
|
"magic-string": "^0.30.17",
|
114
116
|
"mlly": "^1.7.4",
|
115
117
|
"mrmime": "^2.0.1",
|
116
|
-
"nanoid": "^5.1.
|
118
|
+
"nanoid": "^5.1.4",
|
117
119
|
"open": "^10.1.0",
|
118
120
|
"parse5": "^7.2.1",
|
119
121
|
"pathe": "^2.0.3",
|
120
122
|
"periscopic": "^4.0.2",
|
121
123
|
"picocolors": "^1.1.1",
|
122
|
-
"picomatch": "^4.0.2",
|
123
124
|
"postcss-import": "^16.1.0",
|
124
125
|
"postcss-load-config": "^6.0.1",
|
125
126
|
"postcss-modules": "^6.0.1",
|
@@ -133,7 +134,6 @@
|
|
133
134
|
"source-map-support": "^0.5.21",
|
134
135
|
"strip-literal": "^3.0.0",
|
135
136
|
"terser": "^5.39.0",
|
136
|
-
"tinyglobby": "^0.2.12",
|
137
137
|
"tsconfck": "^3.1.5",
|
138
138
|
"tslib": "^2.8.1",
|
139
139
|
"types": "link:./types",
|
package/types/customEvent.d.ts
CHANGED
@@ -33,7 +33,12 @@ export interface InvalidatePayload {
|
|
33
33
|
}
|
34
34
|
|
35
35
|
/**
|
36
|
-
* provides types for built-in Vite events
|
36
|
+
* provides types for payloads of built-in Vite events
|
37
37
|
*/
|
38
38
|
export type InferCustomEventPayload<T extends string> =
|
39
39
|
T extends keyof CustomEventMap ? CustomEventMap[T] : any
|
40
|
+
|
41
|
+
/**
|
42
|
+
* provides types for names of built-in Vite events
|
43
|
+
*/
|
44
|
+
export type CustomEventName = keyof CustomEventMap | (string & {})
|
package/types/hot.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { InferCustomEventPayload } from './customEvent'
|
1
|
+
import type { CustomEventName, InferCustomEventPayload } from './customEvent'
|
2
2
|
|
3
3
|
export type ModuleNamespace = Record<string, any> & {
|
4
4
|
[Symbol.toStringTag]: 'Module'
|
@@ -24,13 +24,16 @@ export interface ViteHotContext {
|
|
24
24
|
prune(cb: (data: any) => void): void
|
25
25
|
invalidate(message?: string): void
|
26
26
|
|
27
|
-
on<T extends
|
27
|
+
on<T extends CustomEventName>(
|
28
28
|
event: T,
|
29
29
|
cb: (payload: InferCustomEventPayload<T>) => void,
|
30
30
|
): void
|
31
|
-
off<T extends
|
31
|
+
off<T extends CustomEventName>(
|
32
32
|
event: T,
|
33
33
|
cb: (payload: InferCustomEventPayload<T>) => void,
|
34
34
|
): void
|
35
|
-
send<T extends
|
35
|
+
send<T extends CustomEventName>(
|
36
|
+
event: T,
|
37
|
+
data?: InferCustomEventPayload<T>,
|
38
|
+
): void
|
36
39
|
}
|
package/types/importMeta.d.ts
CHANGED
@@ -2,8 +2,17 @@
|
|
2
2
|
// Thus cannot contain any top-level imports
|
3
3
|
// <https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation>
|
4
4
|
|
5
|
+
// This is tested in `packages/vite/src/node/__tests_dts__/typeOptions.ts`
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type -- to allow extending by users
|
7
|
+
interface ViteTypeOptions {
|
8
|
+
// strictImportMetaEnv: unknown
|
9
|
+
}
|
10
|
+
|
11
|
+
type ImportMetaEnvFallbackKey =
|
12
|
+
'strictImportMetaEnv' extends keyof ViteTypeOptions ? never : string
|
13
|
+
|
5
14
|
interface ImportMetaEnv {
|
6
|
-
[key:
|
15
|
+
[key: ImportMetaEnvFallbackKey]: any
|
7
16
|
BASE_URL: string
|
8
17
|
MODE: string
|
9
18
|
DEV: boolean
|
package/types/metadata.d.ts
CHANGED
@@ -3,8 +3,33 @@ export interface ChunkMetadata {
|
|
3
3
|
importedCss: Set<string>
|
4
4
|
}
|
5
5
|
|
6
|
+
export interface CustomPluginOptionsVite {
|
7
|
+
/**
|
8
|
+
* If this is a CSS Rollup module, you can scope to its importer's exports
|
9
|
+
* so that if those exports are treeshaken away, the CSS module will also
|
10
|
+
* be treeshaken.
|
11
|
+
*
|
12
|
+
* The "importerId" must import the CSS Rollup module statically.
|
13
|
+
*
|
14
|
+
* Example config if the CSS id is `/src/App.vue?vue&type=style&lang.css`:
|
15
|
+
* ```js
|
16
|
+
* cssScopeTo: ['/src/App.vue', 'default']
|
17
|
+
* ```
|
18
|
+
*
|
19
|
+
* @experimental
|
20
|
+
*/
|
21
|
+
cssScopeTo?: readonly [importerId: string, exportName: string | undefined]
|
22
|
+
|
23
|
+
/** @deprecated no-op since Vite 6.1 */
|
24
|
+
lang?: string
|
25
|
+
}
|
26
|
+
|
6
27
|
declare module 'rollup' {
|
7
28
|
export interface RenderedChunk {
|
8
29
|
viteMetadata?: ChunkMetadata
|
9
30
|
}
|
31
|
+
|
32
|
+
export interface CustomPluginOptions {
|
33
|
+
vite?: CustomPluginOptionsVite
|
34
|
+
}
|
10
35
|
}
|