vite 2.6.6 → 2.6.10
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.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
- package/dist/node/chunks/{dep-8fc3d0a8.js → dep-8e7741a0.js} +2 -2
- package/dist/node/chunks/{dep-8fc3d0a8.js.map → dep-8e7741a0.js.map} +1 -1
- package/dist/node/chunks/{dep-6a58f2f7.js → dep-9b6b378f.js} +2 -2
- package/dist/node/chunks/{dep-6a58f2f7.js.map → dep-9b6b378f.js.map} +1 -1
- package/dist/node/chunks/{dep-da8087f5.js → dep-b502d052.js} +2 -2
- package/dist/node/chunks/{dep-da8087f5.js.map → dep-b502d052.js.map} +1 -1
- package/dist/node/chunks/{dep-713b45e1.js → dep-be032392.js} +59 -27
- package/dist/node/chunks/dep-be032392.js.map +1 -0
- package/dist/node/cli.js +4 -4
- package/dist/node/index.d.ts +517 -2
- package/dist/node/index.js +1 -1
- package/package.json +6 -6
- package/types/ws.d.ts +532 -0
- package/CHANGELOG.md +0 -2265
- package/dist/client/client.d.ts +0 -17
- package/dist/client/env.d.ts +0 -4
- package/dist/client/overlay.d.ts +0 -8
- package/dist/node/build.d.ts +0 -191
- package/dist/node/chunks/dep-1ee92c88.js +0 -10031
- package/dist/node/chunks/dep-1ee92c88.js.map +0 -1
- package/dist/node/chunks/dep-51d7aa64.js +0 -10032
- package/dist/node/chunks/dep-51d7aa64.js.map +0 -1
- package/dist/node/chunks/dep-713b45e1.js.map +0 -1
- package/dist/node/chunks/dep-e5804462.js +0 -10032
- package/dist/node/chunks/dep-e5804462.js.map +0 -1
- package/dist/node/cli.d.ts +0 -1
- package/dist/node/config.d.ts +0 -193
- package/dist/node/constants.d.ts +0 -27
- package/dist/node/importGlob.d.ts +0 -9
- package/dist/node/logger.d.ts +0 -28
- package/dist/node/optimizer/esbuildDepPlugin.d.ts +0 -4
- package/dist/node/optimizer/index.d.ts +0 -66
- package/dist/node/optimizer/registerMissing.d.ts +0 -2
- package/dist/node/optimizer/scan.d.ts +0 -9
- package/dist/node/plugin.d.ts +0 -110
- package/dist/node/plugins/asset.d.ts +0 -40
- package/dist/node/plugins/assetImportMetaUrl.d.ts +0 -13
- package/dist/node/plugins/clientInjections.d.ts +0 -7
- package/dist/node/plugins/css.d.ts +0 -68
- package/dist/node/plugins/dataUri.d.ts +0 -5
- package/dist/node/plugins/define.d.ts +0 -3
- package/dist/node/plugins/esbuild.d.ts +0 -15
- package/dist/node/plugins/html.d.ts +0 -74
- package/dist/node/plugins/importAnalysis.d.ts +0 -32
- package/dist/node/plugins/importAnalysisBuild.d.ts +0 -15
- package/dist/node/plugins/index.d.ts +0 -3
- package/dist/node/plugins/json.d.ts +0 -22
- package/dist/node/plugins/loadFallback.d.ts +0 -5
- package/dist/node/plugins/manifest.d.ts +0 -14
- package/dist/node/plugins/modulePreloadPolyfill.d.ts +0 -4
- package/dist/node/plugins/preAlias.d.ts +0 -5
- package/dist/node/plugins/reporter.d.ts +0 -3
- package/dist/node/plugins/resolve.d.ts +0 -51
- package/dist/node/plugins/terser.d.ts +0 -3
- package/dist/node/plugins/wasm.d.ts +0 -3
- package/dist/node/plugins/worker.d.ts +0 -3
- package/dist/node/preview.d.ts +0 -2
- package/dist/node/server/hmr.d.ts +0 -37
- package/dist/node/server/http.d.ts +0 -14
- package/dist/node/server/index.d.ts +0 -235
- package/dist/node/server/middlewares/base.d.ts +0 -3
- package/dist/node/server/middlewares/error.d.ts +0 -11
- package/dist/node/server/middlewares/indexHtml.d.ts +0 -4
- package/dist/node/server/middlewares/proxy.d.ts +0 -20
- package/dist/node/server/middlewares/spaFallback.d.ts +0 -2
- package/dist/node/server/middlewares/static.d.ts +0 -7
- package/dist/node/server/middlewares/time.d.ts +0 -2
- package/dist/node/server/middlewares/transform.d.ts +0 -3
- package/dist/node/server/moduleGraph.d.ts +0 -46
- package/dist/node/server/openBrowser.d.ts +0 -15
- package/dist/node/server/pluginContainer.d.ts +0 -27
- package/dist/node/server/searchRoot.d.ts +0 -8
- package/dist/node/server/send.d.ts +0 -4
- package/dist/node/server/sourcemap.d.ts +0 -8
- package/dist/node/server/transformRequest.d.ts +0 -14
- package/dist/node/server/ws.d.ts +0 -11
- package/dist/node/ssr/ssrExternal.d.ts +0 -10
- package/dist/node/ssr/ssrManifestPlugin.d.ts +0 -3
- package/dist/node/ssr/ssrModuleLoader.d.ts +0 -8
- package/dist/node/ssr/ssrStacktrace.d.ts +0 -3
- package/dist/node/ssr/ssrTransform.d.ts +0 -8
- package/dist/node/utils.d.ts +0 -90
package/dist/client/client.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import '@vite/env';
|
|
2
|
-
export declare function updateStyle(id: string, content: string): void;
|
|
3
|
-
export declare function removeStyle(id: string): void;
|
|
4
|
-
export declare const createHotContext: (ownerPath: string) => {
|
|
5
|
-
readonly data: any;
|
|
6
|
-
accept(deps: any, callback?: any): void;
|
|
7
|
-
acceptDeps(): never;
|
|
8
|
-
dispose(cb: (data: any) => void): void;
|
|
9
|
-
prune(cb: (data: any) => void): void;
|
|
10
|
-
decline(): void;
|
|
11
|
-
invalidate(): void;
|
|
12
|
-
on: (event: string, cb: (data: any) => void) => void;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* urls here are dynamic import() urls that couldn't be statically analyzed
|
|
16
|
-
*/
|
|
17
|
-
export declare function injectQuery(url: string, queryToInject: string): string;
|
package/dist/client/env.d.ts
DELETED
package/dist/client/overlay.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ErrorPayload } from 'types/hmrPayload';
|
|
2
|
-
export declare class ErrorOverlay extends HTMLElement {
|
|
3
|
-
root: ShadowRoot;
|
|
4
|
-
constructor(err: ErrorPayload['err']);
|
|
5
|
-
text(selector: string, text: string, linkFiles?: boolean): void;
|
|
6
|
-
close(): void;
|
|
7
|
-
}
|
|
8
|
-
export declare const overlayId = "vite-error-overlay";
|
package/dist/node/build.d.ts
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import { InlineConfig, ResolvedConfig } from './config';
|
|
2
|
-
import { Plugin, RollupOptions, RollupWarning, WarningHandler, RollupOutput, WatcherOptions, RollupWatcher, ModuleFormat } from 'rollup';
|
|
3
|
-
import { Terser } from 'types/terser';
|
|
4
|
-
import { RollupCommonJSOptions } from 'types/commonjs';
|
|
5
|
-
import { RollupDynamicImportVarsOptions } from 'types/dynamicImportVars';
|
|
6
|
-
import { TransformOptions } from 'esbuild';
|
|
7
|
-
export interface BuildOptions {
|
|
8
|
-
/**
|
|
9
|
-
* Base public path when served in production.
|
|
10
|
-
* @deprecated `base` is now a root-level config option.
|
|
11
|
-
*/
|
|
12
|
-
base?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Compatibility transform target. The transform is performed with esbuild
|
|
15
|
-
* and the lowest supported target is es2015/es6. Note this only handles
|
|
16
|
-
* syntax transformation and does not cover polyfills (except for dynamic
|
|
17
|
-
* import)
|
|
18
|
-
*
|
|
19
|
-
* Default: 'modules' - Similar to `@babel/preset-env`'s targets.esmodules,
|
|
20
|
-
* transpile targeting browsers that natively support dynamic es module imports.
|
|
21
|
-
* https://caniuse.com/es6-module-dynamic-import
|
|
22
|
-
*
|
|
23
|
-
* Another special value is 'esnext' - which only performs minimal transpiling
|
|
24
|
-
* (for minification compat) and assumes native dynamic imports support.
|
|
25
|
-
*
|
|
26
|
-
* For custom targets, see https://esbuild.github.io/api/#target and
|
|
27
|
-
* https://esbuild.github.io/content-types/#javascript for more details.
|
|
28
|
-
*/
|
|
29
|
-
target?: 'modules' | TransformOptions['target'] | false;
|
|
30
|
-
/**
|
|
31
|
-
* whether to inject module preload polyfill.
|
|
32
|
-
* Note: does not apply to library mode.
|
|
33
|
-
* @default true
|
|
34
|
-
*/
|
|
35
|
-
polyfillModulePreload?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* whether to inject dynamic import polyfill.
|
|
38
|
-
* Note: does not apply to library mode.
|
|
39
|
-
* @default false
|
|
40
|
-
* @deprecated use plugin-legacy for browsers that don't support dynamic import
|
|
41
|
-
*/
|
|
42
|
-
polyfillDynamicImport?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Directory relative from `root` where build output will be placed. If the
|
|
45
|
-
* directory exists, it will be removed before the build.
|
|
46
|
-
* @default 'dist'
|
|
47
|
-
*/
|
|
48
|
-
outDir?: string;
|
|
49
|
-
/**
|
|
50
|
-
* Directory relative from `outDir` where the built js/css/image assets will
|
|
51
|
-
* be placed.
|
|
52
|
-
* @default 'assets'
|
|
53
|
-
*/
|
|
54
|
-
assetsDir?: string;
|
|
55
|
-
/**
|
|
56
|
-
* Static asset files smaller than this number (in bytes) will be inlined as
|
|
57
|
-
* base64 strings. Default limit is `4096` (4kb). Set to `0` to disable.
|
|
58
|
-
* @default 4096
|
|
59
|
-
*/
|
|
60
|
-
assetsInlineLimit?: number;
|
|
61
|
-
/**
|
|
62
|
-
* Whether to code-split CSS. When enabled, CSS in async chunks will be
|
|
63
|
-
* inlined as strings in the chunk and inserted via dynamically created
|
|
64
|
-
* style tags when the chunk is loaded.
|
|
65
|
-
* @default true
|
|
66
|
-
*/
|
|
67
|
-
cssCodeSplit?: boolean;
|
|
68
|
-
/**
|
|
69
|
-
* If `true`, a separate sourcemap file will be created. If 'inline', the
|
|
70
|
-
* sourcemap will be appended to the resulting output file as data URI.
|
|
71
|
-
* 'hidden' works like `true` except that the corresponding sourcemap
|
|
72
|
-
* comments in the bundled files are suppressed.
|
|
73
|
-
* @default false
|
|
74
|
-
*/
|
|
75
|
-
sourcemap?: boolean | 'inline' | 'hidden';
|
|
76
|
-
/**
|
|
77
|
-
* Set to `false` to disable minification, or specify the minifier to use.
|
|
78
|
-
* Available options are 'terser' or 'esbuild'.
|
|
79
|
-
* @default 'terser'
|
|
80
|
-
*/
|
|
81
|
-
minify?: boolean | 'terser' | 'esbuild';
|
|
82
|
-
/**
|
|
83
|
-
* Options for terser
|
|
84
|
-
* https://terser.org/docs/api-reference#minify-options
|
|
85
|
-
*/
|
|
86
|
-
terserOptions?: Terser.MinifyOptions;
|
|
87
|
-
/**
|
|
88
|
-
* @deprecated Vite now uses esbuild for CSS minification.
|
|
89
|
-
*/
|
|
90
|
-
cleanCssOptions?: any;
|
|
91
|
-
/**
|
|
92
|
-
* Will be merged with internal rollup options.
|
|
93
|
-
* https://rollupjs.org/guide/en/#big-list-of-options
|
|
94
|
-
*/
|
|
95
|
-
rollupOptions?: RollupOptions;
|
|
96
|
-
/**
|
|
97
|
-
* Options to pass on to `@rollup/plugin-commonjs`
|
|
98
|
-
*/
|
|
99
|
-
commonjsOptions?: RollupCommonJSOptions;
|
|
100
|
-
/**
|
|
101
|
-
* Options to pass on to `@rollup/plugin-dynamic-import-vars`
|
|
102
|
-
*/
|
|
103
|
-
dynamicImportVarsOptions?: RollupDynamicImportVarsOptions;
|
|
104
|
-
/**
|
|
105
|
-
* Whether to write bundle to disk
|
|
106
|
-
* @default true
|
|
107
|
-
*/
|
|
108
|
-
write?: boolean;
|
|
109
|
-
/**
|
|
110
|
-
* Empty outDir on write.
|
|
111
|
-
* @default true when outDir is a sub directory of project root
|
|
112
|
-
*/
|
|
113
|
-
emptyOutDir?: boolean | null;
|
|
114
|
-
/**
|
|
115
|
-
* Whether to emit a manifest.json under assets dir to map hash-less filenames
|
|
116
|
-
* to their hashed versions. Useful when you want to generate your own HTML
|
|
117
|
-
* instead of using the one generated by Vite.
|
|
118
|
-
*
|
|
119
|
-
* Example:
|
|
120
|
-
*
|
|
121
|
-
* ```json
|
|
122
|
-
* {
|
|
123
|
-
* "main.js": {
|
|
124
|
-
* "file": "main.68fe3fad.js",
|
|
125
|
-
* "css": "main.e6b63442.css",
|
|
126
|
-
* "imports": [...],
|
|
127
|
-
* "dynamicImports": [...]
|
|
128
|
-
* }
|
|
129
|
-
* }
|
|
130
|
-
* ```
|
|
131
|
-
* @default false
|
|
132
|
-
*/
|
|
133
|
-
manifest?: boolean;
|
|
134
|
-
/**
|
|
135
|
-
* Build in library mode. The value should be the global name of the lib in
|
|
136
|
-
* UMD mode. This will produce esm + cjs + umd bundle formats with default
|
|
137
|
-
* configurations that are suitable for distributing libraries.
|
|
138
|
-
*/
|
|
139
|
-
lib?: LibraryOptions | false;
|
|
140
|
-
/**
|
|
141
|
-
* Produce SSR oriented build. Note this requires specifying SSR entry via
|
|
142
|
-
* `rollupOptions.input`.
|
|
143
|
-
*/
|
|
144
|
-
ssr?: boolean | string;
|
|
145
|
-
/**
|
|
146
|
-
* Generate SSR manifest for determining style links and asset preload
|
|
147
|
-
* directives in production.
|
|
148
|
-
*/
|
|
149
|
-
ssrManifest?: boolean;
|
|
150
|
-
/**
|
|
151
|
-
* Set to false to disable reporting compressed chunk sizes.
|
|
152
|
-
* Can slightly improve build speed.
|
|
153
|
-
*/
|
|
154
|
-
reportCompressedSize?: boolean;
|
|
155
|
-
/**
|
|
156
|
-
* Set to false to disable brotli compressed size reporting for build.
|
|
157
|
-
* Can slightly improve build speed.
|
|
158
|
-
* @deprecated use `build.reportCompressedSize` instead.
|
|
159
|
-
*/
|
|
160
|
-
brotliSize?: boolean;
|
|
161
|
-
/**
|
|
162
|
-
* Adjust chunk size warning limit (in kbs).
|
|
163
|
-
* @default 500
|
|
164
|
-
*/
|
|
165
|
-
chunkSizeWarningLimit?: number;
|
|
166
|
-
/**
|
|
167
|
-
* Rollup watch options
|
|
168
|
-
* https://rollupjs.org/guide/en/#watchoptions
|
|
169
|
-
*/
|
|
170
|
-
watch?: WatcherOptions | null;
|
|
171
|
-
}
|
|
172
|
-
export interface LibraryOptions {
|
|
173
|
-
entry: string;
|
|
174
|
-
name?: string;
|
|
175
|
-
formats?: LibraryFormats[];
|
|
176
|
-
fileName?: string | ((format: ModuleFormat) => string);
|
|
177
|
-
}
|
|
178
|
-
export declare type LibraryFormats = 'es' | 'cjs' | 'umd' | 'iife';
|
|
179
|
-
export declare type ResolvedBuildOptions = Required<Omit<BuildOptions, 'base' | 'cleanCssOptions' | 'polyfillDynamicImport' | 'brotliSize'>>;
|
|
180
|
-
export declare function resolveBuildOptions(raw?: BuildOptions): ResolvedBuildOptions;
|
|
181
|
-
export declare function resolveBuildPlugins(config: ResolvedConfig): {
|
|
182
|
-
pre: Plugin[];
|
|
183
|
-
post: Plugin[];
|
|
184
|
-
};
|
|
185
|
-
/**
|
|
186
|
-
* Bundles the app for production.
|
|
187
|
-
* Returns a Promise containing the build result.
|
|
188
|
-
*/
|
|
189
|
-
export declare function build(inlineConfig?: InlineConfig): Promise<RollupOutput | RollupOutput[] | RollupWatcher>;
|
|
190
|
-
export declare function resolveLibFilename(libOptions: LibraryOptions, format: ModuleFormat, root: string): string;
|
|
191
|
-
export declare function onRollupWarning(warning: RollupWarning, warn: WarningHandler, config: ResolvedConfig): void;
|