vite 2.7.0-beta.3 → 2.7.0-beta.4
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 +22 -0
- package/dist/node/chunks/{dep-5243d0d3.js → dep-6cab8e8a.js} +284 -109
- package/dist/node/chunks/dep-6cab8e8a.js.map +1 -0
- package/dist/node/chunks/{dep-777faa4b.js → dep-90234190.js} +2 -2
- package/dist/node/chunks/{dep-777faa4b.js.map → dep-90234190.js.map} +1 -1
- package/dist/node/chunks/{dep-c1084913.js → dep-9583e954.js} +2 -2
- package/dist/node/chunks/{dep-c1084913.js.map → dep-9583e954.js.map} +1 -1
- package/dist/node/chunks/{dep-59a3bcf9.js → dep-ef63fa34.js} +2 -2
- package/dist/node/chunks/{dep-59a3bcf9.js.map → dep-ef63fa34.js.map} +1 -1
- package/dist/node/cli.js +4 -4
- package/dist/node/index.d.ts +16 -5
- package/dist/node/index.js +1 -1
- package/package.json +4 -3
- package/types/commonjs.d.ts +2 -2
- package/types/shims.d.ts +2 -3
- package/dist/node/chunks/dep-5243d0d3.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-6cab8e8a.js');
|
|
5
5
|
var perf_hooks = require('perf_hooks');
|
|
6
6
|
require('fs');
|
|
7
7
|
require('path');
|
|
@@ -686,7 +686,7 @@ cli
|
|
|
686
686
|
.action(async (root, options) => {
|
|
687
687
|
// output structure is preserved even after bundling so require()
|
|
688
688
|
// is ok here
|
|
689
|
-
const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
689
|
+
const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-6cab8e8a.js'); }).then(function (n) { return n.index$1; });
|
|
690
690
|
try {
|
|
691
691
|
const server = await createServer({
|
|
692
692
|
root,
|
|
@@ -735,7 +735,7 @@ cli
|
|
|
735
735
|
.option('--emptyOutDir', `[boolean] force empty outDir when it's outside of root`)
|
|
736
736
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
737
737
|
.action(async (root, options) => {
|
|
738
|
-
const { build: build$1 } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
738
|
+
const { build: build$1 } = await Promise.resolve().then(function () { return require('./chunks/dep-6cab8e8a.js'); }).then(function (n) { return n.build$1; });
|
|
739
739
|
const buildOptions = cleanOptions(options);
|
|
740
740
|
try {
|
|
741
741
|
await build$1({
|
|
@@ -758,7 +758,7 @@ cli
|
|
|
758
758
|
.command('optimize [root]')
|
|
759
759
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
760
760
|
.action(async (root, options) => {
|
|
761
|
-
const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
761
|
+
const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-6cab8e8a.js'); }).then(function (n) { return n.index; });
|
|
762
762
|
try {
|
|
763
763
|
const config = await build.resolveConfig({
|
|
764
764
|
root,
|
package/dist/node/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { IncomingMessage } from 'http';
|
|
|
16
16
|
import { InputOptions } from 'rollup';
|
|
17
17
|
import { LoadResult } from 'rollup';
|
|
18
18
|
import { ModuleFormat } from 'rollup';
|
|
19
|
+
import { ModuleInfo } from 'rollup';
|
|
19
20
|
import * as net from 'net';
|
|
20
21
|
import { OutgoingHttpHeaders } from 'http';
|
|
21
22
|
import { OutputBundle } from 'rollup';
|
|
@@ -982,6 +983,7 @@ export declare interface InternalResolveOptions extends ResolveOptions {
|
|
|
982
983
|
tryPrefix?: string;
|
|
983
984
|
skipPackageJson?: boolean;
|
|
984
985
|
preferRelative?: boolean;
|
|
986
|
+
preserveSymlinks?: boolean;
|
|
985
987
|
isRequire?: boolean;
|
|
986
988
|
isFromTsImporter?: boolean;
|
|
987
989
|
}
|
|
@@ -1064,12 +1066,12 @@ export declare type Matcher = AnymatchPattern | AnymatchPattern[]
|
|
|
1064
1066
|
export declare function mergeConfig(a: Record<string, any>, b: Record<string, any>, isRoot?: boolean): Record<string, any>;
|
|
1065
1067
|
|
|
1066
1068
|
export declare class ModuleGraph {
|
|
1069
|
+
private resolveId;
|
|
1067
1070
|
urlToModuleMap: Map<string, ModuleNode>;
|
|
1068
1071
|
idToModuleMap: Map<string, ModuleNode>;
|
|
1069
1072
|
fileToModulesMap: Map<string, Set<ModuleNode>>;
|
|
1070
1073
|
safeModulesPath: Set<string>;
|
|
1071
|
-
|
|
1072
|
-
constructor(container: PluginContainer);
|
|
1074
|
+
constructor(resolveId: (url: string) => Promise<PartialResolvedId | null>);
|
|
1073
1075
|
getModuleByUrl(rawUrl: string): Promise<ModuleNode | undefined>;
|
|
1074
1076
|
getModuleById(id: string): ModuleNode | undefined;
|
|
1075
1077
|
getModulesByFile(file: string): Set<ModuleNode> | undefined;
|
|
@@ -1084,7 +1086,7 @@ export declare class ModuleGraph {
|
|
|
1084
1086
|
updateModuleInfo(mod: ModuleNode, importedModules: Set<string | ModuleNode>, acceptedModules: Set<string | ModuleNode>, isSelfAccepting: boolean): Promise<Set<ModuleNode> | undefined>;
|
|
1085
1087
|
ensureEntryFromUrl(rawUrl: string): Promise<ModuleNode>;
|
|
1086
1088
|
createFileOnlyEntry(file: string): ModuleNode;
|
|
1087
|
-
resolveUrl(url: string): Promise<
|
|
1089
|
+
resolveUrl(url: string): Promise<ResolvedUrl>;
|
|
1088
1090
|
}
|
|
1089
1091
|
|
|
1090
1092
|
export declare class ModuleNode {
|
|
@@ -1098,6 +1100,8 @@ export declare class ModuleNode {
|
|
|
1098
1100
|
id: string | null;
|
|
1099
1101
|
file: string | null;
|
|
1100
1102
|
type: 'js' | 'css';
|
|
1103
|
+
info?: ModuleInfo;
|
|
1104
|
+
meta?: Record<string, any>;
|
|
1101
1105
|
importers: Set<ModuleNode>;
|
|
1102
1106
|
importedModules: Set<ModuleNode>;
|
|
1103
1107
|
acceptedHmrDeps: Set<ModuleNode>;
|
|
@@ -1243,6 +1247,7 @@ export declare interface Plugin extends Plugin_2 {
|
|
|
1243
1247
|
|
|
1244
1248
|
export declare interface PluginContainer {
|
|
1245
1249
|
options: InputOptions;
|
|
1250
|
+
getModuleInfo(id: string): ModuleInfo | null;
|
|
1246
1251
|
buildStart(options: InputOptions): Promise<void>;
|
|
1247
1252
|
resolveId(id: string, importer?: string, options?: {
|
|
1248
1253
|
skip?: Set<Plugin>;
|
|
@@ -1346,6 +1351,12 @@ export declare interface ResolvedServerOptions extends ServerOptions {
|
|
|
1346
1351
|
fs: Required<FileSystemServeOptions>;
|
|
1347
1352
|
}
|
|
1348
1353
|
|
|
1354
|
+
export declare type ResolvedUrl = [
|
|
1355
|
+
url: string,
|
|
1356
|
+
resolvedId: string,
|
|
1357
|
+
meta: object | null | undefined
|
|
1358
|
+
];
|
|
1359
|
+
|
|
1349
1360
|
export declare function resolveEnvPrefix({ envPrefix }: UserConfig): string[];
|
|
1350
1361
|
|
|
1351
1362
|
export declare type ResolveFn = (id: string, importer?: string, aliasOnly?: boolean, ssr?: boolean) => Promise<string | undefined>;
|
|
@@ -1378,7 +1389,7 @@ export declare interface ResolverObject {
|
|
|
1378
1389
|
*/
|
|
1379
1390
|
export declare interface RollupCommonJSOptions {
|
|
1380
1391
|
/**
|
|
1381
|
-
* A
|
|
1392
|
+
* A picomatch pattern, or array of patterns, which specifies the files in
|
|
1382
1393
|
* the build the plugin should operate on. By default, all files with
|
|
1383
1394
|
* extension `".cjs"` or those in `extensions` are included, but you can narrow
|
|
1384
1395
|
* this list by only including specific files. These files will be analyzed
|
|
@@ -1388,7 +1399,7 @@ export declare interface RollupCommonJSOptions {
|
|
|
1388
1399
|
*/
|
|
1389
1400
|
include?: string | RegExp | readonly (string | RegExp)[]
|
|
1390
1401
|
/**
|
|
1391
|
-
* A
|
|
1402
|
+
* A picomatch pattern, or array of patterns, which specifies the files in
|
|
1392
1403
|
* the build the plugin should _ignore_. By default, all files with
|
|
1393
1404
|
* extensions other than those in `extensions` or `".cjs"` are ignored, but you
|
|
1394
1405
|
* can exclude additional files. See also the `include` option.
|
package/dist/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "2.7.0-beta.
|
|
3
|
+
"version": "2.7.0-beta.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Evan You",
|
|
6
6
|
"description": "Native-ESM powered web dev build tool",
|
|
@@ -68,8 +68,9 @@
|
|
|
68
68
|
"@types/estree": "^0.0.50",
|
|
69
69
|
"@types/etag": "^1.8.1",
|
|
70
70
|
"@types/less": "^3.0.3",
|
|
71
|
+
"@types/micromatch": "^4.0.0",
|
|
71
72
|
"@types/mime": "^2.0.3",
|
|
72
|
-
"@types/node": "^16.11.
|
|
73
|
+
"@types/node": "^16.11.7",
|
|
73
74
|
"@types/resolve": "^1.20.1",
|
|
74
75
|
"@types/sass": "~1.43.0",
|
|
75
76
|
"@types/stylus": "^0.48.36",
|
|
@@ -98,8 +99,8 @@
|
|
|
98
99
|
"http-proxy": "^1.18.1",
|
|
99
100
|
"launch-editor-middleware": "^2.2.1",
|
|
100
101
|
"magic-string": "^0.25.7",
|
|
102
|
+
"micromatch": "^4.0.4",
|
|
101
103
|
"mime": "^3.0.0",
|
|
102
|
-
"minimatch": "^3.0.4",
|
|
103
104
|
"okie": "^1.0.1",
|
|
104
105
|
"open": "^8.4.0",
|
|
105
106
|
"periscopic": "^2.0.3",
|
package/types/commonjs.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export interface RollupCommonJSOptions {
|
|
9
9
|
/**
|
|
10
|
-
* A
|
|
10
|
+
* A picomatch pattern, or array of patterns, which specifies the files in
|
|
11
11
|
* the build the plugin should operate on. By default, all files with
|
|
12
12
|
* extension `".cjs"` or those in `extensions` are included, but you can narrow
|
|
13
13
|
* this list by only including specific files. These files will be analyzed
|
|
@@ -17,7 +17,7 @@ export interface RollupCommonJSOptions {
|
|
|
17
17
|
*/
|
|
18
18
|
include?: string | RegExp | readonly (string | RegExp)[]
|
|
19
19
|
/**
|
|
20
|
-
* A
|
|
20
|
+
* A picomatch pattern, or array of patterns, which specifies the files in
|
|
21
21
|
* the build the plugin should _ignore_. By default, all files with
|
|
22
22
|
* extensions other than those in `extensions` or `".cjs"` are ignored, but you
|
|
23
23
|
* can exclude additional files. See also the `include` option.
|
package/types/shims.d.ts
CHANGED
|
@@ -95,13 +95,12 @@ declare module 'rollup-plugin-web-worker-loader' {
|
|
|
95
95
|
export default p
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
declare module '
|
|
99
|
-
function
|
|
98
|
+
declare module 'micromatch' {
|
|
99
|
+
export function isMatch(
|
|
100
100
|
path: string,
|
|
101
101
|
pattern: string,
|
|
102
102
|
options?: { matchBase?: boolean }
|
|
103
103
|
): boolean
|
|
104
|
-
export default match
|
|
105
104
|
}
|
|
106
105
|
|
|
107
106
|
declare module 'compression' {
|