vite 2.8.0-beta.0 → 2.8.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.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
- package/CHANGELOG.md +9 -0
- package/dist/node/chunks/{dep-7cd25957.js → dep-51191982.js} +2 -2
- package/dist/node/chunks/{dep-7cd25957.js.map → dep-51191982.js.map} +1 -1
- package/dist/node/chunks/{dep-372aad6a.js → dep-e4a9e288.js} +2 -2
- package/dist/node/chunks/{dep-372aad6a.js.map → dep-e4a9e288.js.map} +1 -1
- package/dist/node/chunks/{dep-5ad1713b.js → dep-e4dc9ea2.js} +122 -48
- package/dist/node/chunks/dep-e4dc9ea2.js.map +1 -0
- package/dist/node/chunks/{dep-920a704a.js → dep-fccf00e1.js} +2 -2
- package/dist/node/chunks/{dep-920a704a.js.map → dep-fccf00e1.js.map} +1 -1
- package/dist/node/cli.js +4 -4
- package/dist/node/config.d.ts +7 -1
- package/dist/node/index.d.ts +8 -1
- package/dist/node/index.js +1 -1
- package/dist/node/plugins/css.d.ts +2 -1
- package/dist/node/plugins/html.d.ts +4 -2
- package/dist/node/plugins/worker.d.ts +2 -0
- package/dist/node/plugins/workerImportMetaUrl.d.ts +3 -0
- package/package.json +1 -1
- package/dist/node/chunks/dep-5ad1713b.js.map +0 -1
package/dist/node/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var require$$0 = require('events');
|
|
4
|
-
var build = require('./chunks/dep-
|
|
4
|
+
var build = require('./chunks/dep-e4dc9ea2.js');
|
|
5
5
|
var perf_hooks = require('perf_hooks');
|
|
6
6
|
require('fs');
|
|
7
7
|
require('path');
|
|
@@ -684,7 +684,7 @@ cli
|
|
|
684
684
|
.action(async (root, options) => {
|
|
685
685
|
// output structure is preserved even after bundling so require()
|
|
686
686
|
// is ok here
|
|
687
|
-
const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
687
|
+
const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-e4dc9ea2.js'); }).then(function (n) { return n.index$1; });
|
|
688
688
|
try {
|
|
689
689
|
const server = await createServer({
|
|
690
690
|
root,
|
|
@@ -733,7 +733,7 @@ cli
|
|
|
733
733
|
.option('--emptyOutDir', `[boolean] force empty outDir when it's outside of root`)
|
|
734
734
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
735
735
|
.action(async (root, options) => {
|
|
736
|
-
const { build: build$1 } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
736
|
+
const { build: build$1 } = await Promise.resolve().then(function () { return require('./chunks/dep-e4dc9ea2.js'); }).then(function (n) { return n.build$1; });
|
|
737
737
|
const buildOptions = cleanOptions(options);
|
|
738
738
|
try {
|
|
739
739
|
await build$1({
|
|
@@ -756,7 +756,7 @@ cli
|
|
|
756
756
|
.command('optimize [root]')
|
|
757
757
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
758
758
|
.action(async (root, options) => {
|
|
759
|
-
const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
759
|
+
const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-e4dc9ea2.js'); }).then(function (n) { return n.index; });
|
|
760
760
|
try {
|
|
761
761
|
const config = await build.resolveConfig({
|
|
762
762
|
root,
|
package/dist/node/config.d.ts
CHANGED
|
@@ -179,11 +179,16 @@ export interface SSROptions {
|
|
|
179
179
|
*/
|
|
180
180
|
target?: SSRTarget;
|
|
181
181
|
}
|
|
182
|
+
export interface ResolveWorkerOptions {
|
|
183
|
+
format: 'es' | 'iife';
|
|
184
|
+
plugins: Plugin[];
|
|
185
|
+
rollupOptions: RollupOptions;
|
|
186
|
+
}
|
|
182
187
|
export interface InlineConfig extends UserConfig {
|
|
183
188
|
configFile?: string | false;
|
|
184
189
|
envFile?: false;
|
|
185
190
|
}
|
|
186
|
-
export declare type ResolvedConfig = Readonly<Omit<UserConfig, 'plugins' | 'alias' | 'dedupe' | 'assetsInclude' | 'optimizeDeps'> & {
|
|
191
|
+
export declare type ResolvedConfig = Readonly<Omit<UserConfig, 'plugins' | 'alias' | 'dedupe' | 'assetsInclude' | 'optimizeDeps' | 'worker'> & {
|
|
187
192
|
configFile: string | undefined;
|
|
188
193
|
configFileDependencies: string[];
|
|
189
194
|
inlineConfig: InlineConfig;
|
|
@@ -207,6 +212,7 @@ export declare type ResolvedConfig = Readonly<Omit<UserConfig, 'plugins' | 'alia
|
|
|
207
212
|
optimizeDeps: Omit<DepOptimizationOptions, 'keepNames'>;
|
|
208
213
|
/** @internal */
|
|
209
214
|
packageCache: PackageCache;
|
|
215
|
+
worker: ResolveWorkerOptions;
|
|
210
216
|
}>;
|
|
211
217
|
export declare type ResolveFn = (id: string, importer?: string, aliasOnly?: boolean, ssr?: boolean) => Promise<string | undefined>;
|
|
212
218
|
export declare function resolveConfig(inlineConfig: InlineConfig, command: 'build' | 'serve', defaultMode?: string): Promise<ResolvedConfig>;
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1326,7 +1326,7 @@ export declare function resolveConfig(inlineConfig: InlineConfig, command: 'buil
|
|
|
1326
1326
|
|
|
1327
1327
|
export declare type ResolvedBuildOptions = Required<Omit<BuildOptions, 'base' | 'cleanCssOptions' | 'polyfillDynamicImport' | 'brotliSize'>>;
|
|
1328
1328
|
|
|
1329
|
-
export declare type ResolvedConfig = Readonly<Omit<UserConfig, 'plugins' | 'alias' | 'dedupe' | 'assetsInclude' | 'optimizeDeps'> & {
|
|
1329
|
+
export declare type ResolvedConfig = Readonly<Omit<UserConfig, 'plugins' | 'alias' | 'dedupe' | 'assetsInclude' | 'optimizeDeps' | 'worker'> & {
|
|
1330
1330
|
configFile: string | undefined;
|
|
1331
1331
|
configFileDependencies: string[];
|
|
1332
1332
|
inlineConfig: InlineConfig;
|
|
@@ -1349,6 +1349,7 @@ export declare type ResolvedConfig = Readonly<Omit<UserConfig, 'plugins' | 'alia
|
|
|
1349
1349
|
createResolver: (options?: Partial<InternalResolveOptions>) => ResolveFn;
|
|
1350
1350
|
optimizeDeps: Omit<DepOptimizationOptions, 'keepNames'>;
|
|
1351
1351
|
/* Excluded from this release type: packageCache */
|
|
1352
|
+
worker: ResolveWorkerOptions;
|
|
1352
1353
|
}>;
|
|
1353
1354
|
|
|
1354
1355
|
export declare interface ResolvedPreviewOptions extends PreviewOptions {
|
|
@@ -1387,6 +1388,12 @@ export declare interface ResolverObject {
|
|
|
1387
1388
|
resolveId: ResolverFunction
|
|
1388
1389
|
}
|
|
1389
1390
|
|
|
1391
|
+
export declare interface ResolveWorkerOptions {
|
|
1392
|
+
format: 'es' | 'iife';
|
|
1393
|
+
plugins: Plugin[];
|
|
1394
|
+
rollupOptions: RollupOptions;
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1390
1397
|
/**
|
|
1391
1398
|
* https://github.com/rollup/plugins/blob/master/packages/commonjs/types/index.d.ts
|
|
1392
1399
|
*
|
package/dist/node/index.js
CHANGED
|
@@ -29,7 +29,7 @@ export declare const isCSSRequest: (request: string) => boolean;
|
|
|
29
29
|
export declare const isDirectCSSRequest: (request: string) => boolean;
|
|
30
30
|
export declare const isDirectRequest: (request: string) => boolean;
|
|
31
31
|
export declare const chunkToEmittedCssFileMap: WeakMap<RenderedChunk, Set<string>>;
|
|
32
|
-
export declare const removedPureCssFilesCache: WeakMap<Readonly<Omit<import("../config").UserConfig, "plugins" | "alias" | "dedupe" | "assetsInclude" | "optimizeDeps"> & {
|
|
32
|
+
export declare const removedPureCssFilesCache: WeakMap<Readonly<Omit<import("../config").UserConfig, "plugins" | "alias" | "dedupe" | "assetsInclude" | "optimizeDeps" | "worker"> & {
|
|
33
33
|
configFile: string | undefined;
|
|
34
34
|
configFileDependencies: string[];
|
|
35
35
|
inlineConfig: import("../config").InlineConfig;
|
|
@@ -52,6 +52,7 @@ export declare const removedPureCssFilesCache: WeakMap<Readonly<Omit<import("../
|
|
|
52
52
|
createResolver: (options?: Partial<import("./resolve").InternalResolveOptions> | undefined) => ResolveFn;
|
|
53
53
|
optimizeDeps: Omit<import("../optimizer").DepOptimizationOptions, "keepNames">;
|
|
54
54
|
packageCache: import("../packages").PackageCache;
|
|
55
|
+
worker: import("../config").ResolveWorkerOptions;
|
|
55
56
|
}>, Map<string, RenderedChunk>>;
|
|
56
57
|
/**
|
|
57
58
|
* Plugin applied before user plugins
|
|
@@ -4,7 +4,7 @@ import type { OutputBundle, OutputChunk } from 'rollup';
|
|
|
4
4
|
import type { ResolvedConfig } from '../config';
|
|
5
5
|
import type { AttributeNode, NodeTransform, ElementNode } from '@vue/compiler-dom';
|
|
6
6
|
export declare const isHTMLProxy: (id: string) => boolean;
|
|
7
|
-
export declare const htmlProxyMap: WeakMap<Readonly<Omit<import("../config").UserConfig, "plugins" | "alias" | "dedupe" | "assetsInclude" | "optimizeDeps"> & {
|
|
7
|
+
export declare const htmlProxyMap: WeakMap<Readonly<Omit<import("../config").UserConfig, "plugins" | "alias" | "dedupe" | "assetsInclude" | "optimizeDeps" | "worker"> & {
|
|
8
8
|
configFile: string | undefined;
|
|
9
9
|
configFileDependencies: string[];
|
|
10
10
|
inlineConfig: import("../config").InlineConfig;
|
|
@@ -27,13 +27,14 @@ export declare const htmlProxyMap: WeakMap<Readonly<Omit<import("../config").Use
|
|
|
27
27
|
createResolver: (options?: Partial<import("./resolve").InternalResolveOptions> | undefined) => import("../config").ResolveFn;
|
|
28
28
|
optimizeDeps: Omit<import("..").DepOptimizationOptions, "keepNames">;
|
|
29
29
|
packageCache: import("..").PackageCache;
|
|
30
|
+
worker: import("../config").ResolveWorkerOptions;
|
|
30
31
|
}>, Map<string, string[]>>;
|
|
31
32
|
export declare const htmlProxyResult: Map<string, string>;
|
|
32
33
|
export declare function htmlInlineProxyPlugin(config: ResolvedConfig): Plugin;
|
|
33
34
|
export declare function addToHTMLProxyCache(config: ResolvedConfig, filePath: string, index: number, code: string): void;
|
|
34
35
|
export declare function addToHTMLProxyTransformResult(hash: string, code: string): void;
|
|
35
36
|
export declare const assetAttrsConfig: Record<string, string[]>;
|
|
36
|
-
export declare const isAsyncScriptMap: WeakMap<Readonly<Omit<import("../config").UserConfig, "plugins" | "alias" | "dedupe" | "assetsInclude" | "optimizeDeps"> & {
|
|
37
|
+
export declare const isAsyncScriptMap: WeakMap<Readonly<Omit<import("../config").UserConfig, "plugins" | "alias" | "dedupe" | "assetsInclude" | "optimizeDeps" | "worker"> & {
|
|
37
38
|
configFile: string | undefined;
|
|
38
39
|
configFileDependencies: string[];
|
|
39
40
|
inlineConfig: import("../config").InlineConfig;
|
|
@@ -56,6 +57,7 @@ export declare const isAsyncScriptMap: WeakMap<Readonly<Omit<import("../config")
|
|
|
56
57
|
createResolver: (options?: Partial<import("./resolve").InternalResolveOptions> | undefined) => import("../config").ResolveFn;
|
|
57
58
|
optimizeDeps: Omit<import("..").DepOptimizationOptions, "keepNames">;
|
|
58
59
|
packageCache: import("..").PackageCache;
|
|
60
|
+
worker: import("../config").ResolveWorkerOptions;
|
|
59
61
|
}>, Map<string, boolean>>;
|
|
60
62
|
export declare function traverseHtml(html: string, filePath: string, visitor: NodeTransform): Promise<void>;
|
|
61
63
|
export declare function getScriptInfo(node: ElementNode): {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import type { ResolvedConfig } from '../config';
|
|
2
3
|
import type { Plugin } from '../plugin';
|
|
4
|
+
export declare function bundleWorkerEntry(config: ResolvedConfig, id: string): Promise<Buffer>;
|
|
3
5
|
export declare function webWorkerPlugin(config: ResolvedConfig): Plugin;
|