vite 4.0.0-alpha.5 → 4.0.0-beta.0
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 +30 -31
- package/bin/vite.js +1 -1
- package/client.d.ts +25 -1
- package/dist/client/client.mjs +19 -20
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-4ec4968a.js → dep-1e0f5bc1.js} +58 -18
- package/dist/node/chunks/{dep-72c42a3f.js → dep-753720be.js} +1 -1
- package/dist/node/chunks/{dep-fadb3c21.js → dep-a5101d9f.js} +3021 -2898
- package/dist/node/cli.js +13 -13
- package/dist/node/constants.js +9 -8
- package/dist/node/index.d.ts +124 -97
- package/dist/node/index.js +12 -10
- package/dist/node-cjs/publicUtils.cjs +191 -132
- package/index.cjs +3 -2
- package/package.json +14 -14
- package/types/customEvent.d.ts +1 -1
- package/types/hot.d.ts +4 -5
- package/types/importGlob.d.ts +8 -8
package/types/customEvent.d.ts
CHANGED
package/types/hot.d.ts
CHANGED
|
@@ -12,22 +12,21 @@ export interface ViteHotContext {
|
|
|
12
12
|
accept(dep: string, cb: (mod: ModuleNamespace | undefined) => void): void
|
|
13
13
|
accept(
|
|
14
14
|
deps: readonly string[],
|
|
15
|
-
cb: (mods: Array<ModuleNamespace | undefined>) => void
|
|
15
|
+
cb: (mods: Array<ModuleNamespace | undefined>) => void,
|
|
16
16
|
): void
|
|
17
17
|
|
|
18
|
-
acceptExports(exportNames: string | readonly string[]): void
|
|
19
18
|
acceptExports(
|
|
20
19
|
exportNames: string | readonly string[],
|
|
21
|
-
cb
|
|
20
|
+
cb?: (mod: ModuleNamespace | undefined) => void,
|
|
22
21
|
): void
|
|
23
22
|
|
|
24
23
|
dispose(cb: (data: any) => void): void
|
|
25
|
-
|
|
24
|
+
prune(cb: (data: any) => void): void
|
|
26
25
|
invalidate(message?: string): void
|
|
27
26
|
|
|
28
27
|
on<T extends string>(
|
|
29
28
|
event: T,
|
|
30
|
-
cb: (payload: InferCustomEventPayload<T>) => void
|
|
29
|
+
cb: (payload: InferCustomEventPayload<T>) => void,
|
|
31
30
|
): void
|
|
32
31
|
send<T extends string>(event: T, data?: InferCustomEventPayload<T>): void
|
|
33
32
|
}
|
package/types/importGlob.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface ImportGlobOptions<
|
|
2
2
|
Eager extends boolean,
|
|
3
|
-
AsType extends string
|
|
3
|
+
AsType extends string,
|
|
4
4
|
> {
|
|
5
5
|
/**
|
|
6
6
|
* Import type for the import url.
|
|
@@ -45,10 +45,10 @@ export interface ImportGlobFunction {
|
|
|
45
45
|
<
|
|
46
46
|
Eager extends boolean,
|
|
47
47
|
As extends string,
|
|
48
|
-
T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown
|
|
48
|
+
T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown,
|
|
49
49
|
>(
|
|
50
50
|
glob: string | string[],
|
|
51
|
-
options?: ImportGlobOptions<Eager, As
|
|
51
|
+
options?: ImportGlobOptions<Eager, As>,
|
|
52
52
|
): (Eager extends true ? true : false) extends true
|
|
53
53
|
? Record<string, T>
|
|
54
54
|
: Record<string, () => Promise<T>>
|
|
@@ -59,7 +59,7 @@ export interface ImportGlobFunction {
|
|
|
59
59
|
*/
|
|
60
60
|
<M>(
|
|
61
61
|
glob: string | string[],
|
|
62
|
-
options?: ImportGlobOptions<false, string
|
|
62
|
+
options?: ImportGlobOptions<false, string>,
|
|
63
63
|
): Record<string, () => Promise<M>>
|
|
64
64
|
/**
|
|
65
65
|
* Import a list of files with a glob pattern.
|
|
@@ -68,7 +68,7 @@ export interface ImportGlobFunction {
|
|
|
68
68
|
*/
|
|
69
69
|
<M>(
|
|
70
70
|
glob: string | string[],
|
|
71
|
-
options: ImportGlobOptions<true, string
|
|
71
|
+
options: ImportGlobOptions<true, string>,
|
|
72
72
|
): Record<string, M>
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -80,10 +80,10 @@ export interface ImportGlobEagerFunction {
|
|
|
80
80
|
*/
|
|
81
81
|
<
|
|
82
82
|
As extends string,
|
|
83
|
-
T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown
|
|
83
|
+
T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown,
|
|
84
84
|
>(
|
|
85
85
|
glob: string | string[],
|
|
86
|
-
options?: Omit<ImportGlobOptions<boolean, As>, 'eager'
|
|
86
|
+
options?: Omit<ImportGlobOptions<boolean, As>, 'eager'>,
|
|
87
87
|
): Record<string, T>
|
|
88
88
|
/**
|
|
89
89
|
* Eagerly import a list of files with a glob pattern.
|
|
@@ -92,6 +92,6 @@ export interface ImportGlobEagerFunction {
|
|
|
92
92
|
*/
|
|
93
93
|
<M>(
|
|
94
94
|
glob: string | string[],
|
|
95
|
-
options?: Omit<ImportGlobOptions<boolean, string>, 'eager'
|
|
95
|
+
options?: Omit<ImportGlobOptions<boolean, string>, 'eager'>,
|
|
96
96
|
): Record<string, M>
|
|
97
97
|
}
|