vite 2.9.0-beta.4 → 2.9.0-beta.8
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-dd016db2.js → dep-35d2a41c.js} +116 -8
- package/dist/node/chunks/{dep-8a000299.js → dep-57c89c81.js} +1 -1
- package/dist/node/chunks/{dep-5a245411.js → dep-a7fb482c.js} +923 -665
- package/dist/node/chunks/{dep-0d07874d.js → dep-c9843b31.js} +1 -1
- package/dist/node/cli.js +6 -6
- package/dist/node/index.d.ts +23 -14
- package/dist/node/index.js +3 -2
- package/package.json +8 -7
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 index = require('./chunks/dep-
|
|
4
|
+
var index = require('./chunks/dep-a7fb482c.js');
|
|
5
5
|
var perf_hooks = require('perf_hooks');
|
|
6
6
|
require('fs');
|
|
7
7
|
require('path');
|
|
@@ -19,9 +19,9 @@ require('zlib');
|
|
|
19
19
|
require('crypto');
|
|
20
20
|
require('tls');
|
|
21
21
|
require('assert');
|
|
22
|
+
require('esbuild');
|
|
22
23
|
require('buffer');
|
|
23
24
|
require('querystring');
|
|
24
|
-
require('esbuild');
|
|
25
25
|
require('child_process');
|
|
26
26
|
require('worker_threads');
|
|
27
27
|
require('readline');
|
|
@@ -683,7 +683,7 @@ cli
|
|
|
683
683
|
.action(async (root, options) => {
|
|
684
684
|
// output structure is preserved even after bundling so require()
|
|
685
685
|
// is ok here
|
|
686
|
-
const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
686
|
+
const { createServer } = await Promise.resolve().then(function () { return require('./chunks/dep-a7fb482c.js'); }).then(function (n) { return n.index$1; });
|
|
687
687
|
try {
|
|
688
688
|
const server = await createServer({
|
|
689
689
|
root,
|
|
@@ -732,7 +732,7 @@ cli
|
|
|
732
732
|
.option('--emptyOutDir', `[boolean] force empty outDir when it's outside of root`)
|
|
733
733
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
734
734
|
.action(async (root, options) => {
|
|
735
|
-
const { build } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
735
|
+
const { build } = await Promise.resolve().then(function () { return require('./chunks/dep-a7fb482c.js'); }).then(function (n) { return n.build$1; });
|
|
736
736
|
const buildOptions = cleanOptions(options);
|
|
737
737
|
try {
|
|
738
738
|
await build({
|
|
@@ -755,7 +755,7 @@ cli
|
|
|
755
755
|
.command('optimize [root]', 'pre-bundle dependencies')
|
|
756
756
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
757
757
|
.action(async (root, options) => {
|
|
758
|
-
const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
758
|
+
const { optimizeDeps } = await Promise.resolve().then(function () { return require('./chunks/dep-a7fb482c.js'); }).then(function (n) { return n.index; });
|
|
759
759
|
try {
|
|
760
760
|
const config = await index.resolveConfig({
|
|
761
761
|
root,
|
|
@@ -778,7 +778,7 @@ cli
|
|
|
778
778
|
.option('--https', `[boolean] use TLS + HTTP/2`)
|
|
779
779
|
.option('--open [path]', `[boolean | string] open browser on startup`)
|
|
780
780
|
.action(async (root, options) => {
|
|
781
|
-
const { preview } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
781
|
+
const { preview } = await Promise.resolve().then(function () { return require('./chunks/dep-a7fb482c.js'); }).then(function (n) { return n.preview$1; });
|
|
782
782
|
try {
|
|
783
783
|
const server = await preview({
|
|
784
784
|
root,
|
package/dist/node/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import type { DuplexOptions } from 'stream';
|
|
|
10
10
|
import { TransformOptions as EsbuildTransformOptions } from 'esbuild';
|
|
11
11
|
import { EventEmitter } from 'events';
|
|
12
12
|
import * as events from 'events';
|
|
13
|
+
import type { ExistingRawSourceMap } from 'rollup';
|
|
13
14
|
import type * as fs from 'fs';
|
|
14
15
|
import type { GetManualChunk } from 'rollup';
|
|
15
16
|
import * as http from 'http';
|
|
@@ -524,6 +525,10 @@ export declare interface DepOptimizationMetadata {
|
|
|
524
525
|
* Metadata for each newly discovered dependency after processing
|
|
525
526
|
*/
|
|
526
527
|
discovered: Record<string, OptimizedDepInfo>;
|
|
528
|
+
/**
|
|
529
|
+
* OptimizedDepInfo list
|
|
530
|
+
*/
|
|
531
|
+
depInfoList: OptimizedDepInfo[];
|
|
527
532
|
}
|
|
528
533
|
|
|
529
534
|
export declare interface DepOptimizationOptions {
|
|
@@ -583,17 +588,11 @@ export declare interface DepOptimizationProcessing {
|
|
|
583
588
|
}
|
|
584
589
|
|
|
585
590
|
export declare interface DepOptimizationResult {
|
|
586
|
-
|
|
587
|
-
* After a re-optimization, the internal bundled chunks may change
|
|
588
|
-
* and a full page reload is required if that is the case
|
|
589
|
-
* If the files are stable, we can avoid the reload that is expensive
|
|
590
|
-
* for large applications
|
|
591
|
-
*/
|
|
592
|
-
alteredFiles: boolean;
|
|
591
|
+
metadata: DepOptimizationMetadata;
|
|
593
592
|
/**
|
|
594
593
|
* When doing a re-run, if there are newly discovered dependendencies
|
|
595
|
-
* the page reload will be delayed until the next rerun so
|
|
596
|
-
*
|
|
594
|
+
* the page reload will be delayed until the next rerun so we need
|
|
595
|
+
* to be able to discard the result
|
|
597
596
|
*/
|
|
598
597
|
commit: () => void;
|
|
599
598
|
cancel: () => void;
|
|
@@ -658,6 +657,8 @@ export declare interface FileSystemServeOptions {
|
|
|
658
657
|
deny?: string[];
|
|
659
658
|
}
|
|
660
659
|
|
|
660
|
+
export declare function formatPostcssSourceMap(rawMap: ExistingRawSourceMap, file: string): ExistingRawSourceMap;
|
|
661
|
+
|
|
661
662
|
export declare class FSWatcher extends EventEmitter implements fs.FSWatcher {
|
|
662
663
|
options: WatchOptions
|
|
663
664
|
|
|
@@ -1046,6 +1047,7 @@ export declare interface InternalResolveOptions extends ResolveOptions {
|
|
|
1046
1047
|
isRequire?: boolean;
|
|
1047
1048
|
isFromTsImporter?: boolean;
|
|
1048
1049
|
tryEsmOnly?: boolean;
|
|
1050
|
+
scan?: boolean;
|
|
1049
1051
|
}
|
|
1050
1052
|
|
|
1051
1053
|
export declare interface JsonOptions {
|
|
@@ -1177,8 +1179,9 @@ export declare class ModuleNode {
|
|
|
1177
1179
|
export declare function normalizePath(id: string): string;
|
|
1178
1180
|
|
|
1179
1181
|
export declare interface OptimizedDepInfo {
|
|
1182
|
+
id: string;
|
|
1180
1183
|
file: string;
|
|
1181
|
-
src
|
|
1184
|
+
src?: string;
|
|
1182
1185
|
needsInterop?: boolean;
|
|
1183
1186
|
browserHash?: string;
|
|
1184
1187
|
fileHash?: string;
|
|
@@ -1189,11 +1192,16 @@ export declare interface OptimizedDepInfo {
|
|
|
1189
1192
|
processing?: Promise<void>;
|
|
1190
1193
|
}
|
|
1191
1194
|
|
|
1195
|
+
export declare interface OptimizedDeps {
|
|
1196
|
+
metadata: DepOptimizationMetadata;
|
|
1197
|
+
scanProcessing?: Promise<void>;
|
|
1198
|
+
registerMissingImport: (id: string, resolved: string) => OptimizedDepInfo;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1192
1201
|
/**
|
|
1193
1202
|
* Used by Vite CLI when running `vite optimize`
|
|
1194
1203
|
*/
|
|
1195
|
-
export declare function optimizeDeps(config: ResolvedConfig, force?: boolean | undefined, asCommand?: boolean
|
|
1196
|
-
ssr?: boolean): Promise<DepOptimizationMetadata>;
|
|
1204
|
+
export declare function optimizeDeps(config: ResolvedConfig, force?: boolean | undefined, asCommand?: boolean): Promise<DepOptimizationMetadata>;
|
|
1197
1205
|
|
|
1198
1206
|
/** Cache for package.json resolution and package.json contents */
|
|
1199
1207
|
export declare type PackageCache = Map<string, PackageData>;
|
|
@@ -1316,6 +1324,7 @@ export declare interface Plugin extends Plugin_2 {
|
|
|
1316
1324
|
resolveId?(this: PluginContext, source: string, importer: string | undefined, options: {
|
|
1317
1325
|
custom?: CustomPluginOptions;
|
|
1318
1326
|
ssr?: boolean;
|
|
1327
|
+
/* Excluded from this release type: scan */
|
|
1319
1328
|
}): Promise<ResolveIdResult> | ResolveIdResult;
|
|
1320
1329
|
load?(this: PluginContext, id: string, options?: {
|
|
1321
1330
|
ssr?: boolean;
|
|
@@ -1332,6 +1341,7 @@ export declare interface PluginContainer {
|
|
|
1332
1341
|
resolveId(id: string, importer?: string, options?: {
|
|
1333
1342
|
skip?: Set<Plugin>;
|
|
1334
1343
|
ssr?: boolean;
|
|
1344
|
+
/* Excluded from this release type: scan */
|
|
1335
1345
|
}): Promise<PartialResolvedId | null>;
|
|
1336
1346
|
transform(code: string, id: string, options?: {
|
|
1337
1347
|
inMap?: SourceDescription['map'];
|
|
@@ -2192,12 +2202,11 @@ export declare interface ViteDevServer {
|
|
|
2192
2202
|
* @param forceOptimize - force the optimizer to re-bundle, same as --force cli flag
|
|
2193
2203
|
*/
|
|
2194
2204
|
restart(forceOptimize?: boolean): Promise<void>;
|
|
2195
|
-
/* Excluded from this release type:
|
|
2205
|
+
/* Excluded from this release type: _optimizedDeps */
|
|
2196
2206
|
/* Excluded from this release type: _ssrExternals */
|
|
2197
2207
|
/* Excluded from this release type: _globImporters */
|
|
2198
2208
|
/* Excluded from this release type: _restartPromise */
|
|
2199
2209
|
/* Excluded from this release type: _forceOptimizeOnRestart */
|
|
2200
|
-
/* Excluded from this release type: _registerMissingImport */
|
|
2201
2210
|
/* Excluded from this release type: _pendingRequests */
|
|
2202
2211
|
}
|
|
2203
2212
|
|
package/dist/node/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./chunks/dep-
|
|
5
|
+
var index = require('./chunks/dep-a7fb482c.js');
|
|
6
6
|
require('fs');
|
|
7
7
|
require('path');
|
|
8
8
|
require('tty');
|
|
@@ -21,9 +21,9 @@ require('zlib');
|
|
|
21
21
|
require('crypto');
|
|
22
22
|
require('tls');
|
|
23
23
|
require('assert');
|
|
24
|
+
require('esbuild');
|
|
24
25
|
require('buffer');
|
|
25
26
|
require('querystring');
|
|
26
|
-
require('esbuild');
|
|
27
27
|
require('child_process');
|
|
28
28
|
require('worker_threads');
|
|
29
29
|
require('readline');
|
|
@@ -137,6 +137,7 @@ exports.build = index.build;
|
|
|
137
137
|
exports.createLogger = index.createLogger;
|
|
138
138
|
exports.createServer = index.createServer;
|
|
139
139
|
exports.defineConfig = index.defineConfig;
|
|
140
|
+
exports.formatPostcssSourceMap = index.formatPostcssSourceMap;
|
|
140
141
|
exports.loadConfigFromFile = index.loadConfigFromFile;
|
|
141
142
|
exports.loadEnv = index.loadEnv;
|
|
142
143
|
exports.mergeConfig = index.mergeConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "2.9.0-beta.
|
|
3
|
+
"version": "2.9.0-beta.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Evan You",
|
|
6
6
|
"description": "Native-ESM powered web dev build tool",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@ampproject/remapping": "^2.1.2",
|
|
56
|
-
"@babel/parser": "^7.17.
|
|
56
|
+
"@babel/parser": "^7.17.8",
|
|
57
57
|
"@babel/types": "^7.17.0",
|
|
58
58
|
"@jridgewell/trace-mapping": "^0.3.4",
|
|
59
59
|
"@rollup/plugin-alias": "^3.1.9",
|
|
@@ -85,20 +85,20 @@
|
|
|
85
85
|
"convert-source-map": "^1.8.0",
|
|
86
86
|
"cors": "^2.8.5",
|
|
87
87
|
"cross-spawn": "^7.0.3",
|
|
88
|
-
"debug": "^4.3.
|
|
88
|
+
"debug": "^4.3.4",
|
|
89
89
|
"dotenv": "^14.3.2",
|
|
90
90
|
"dotenv-expand": "^5.1.0",
|
|
91
|
-
"es-module-lexer": "^0.10.
|
|
91
|
+
"es-module-lexer": "^0.10.4",
|
|
92
92
|
"estree-walker": "^2.0.2",
|
|
93
93
|
"etag": "^1.8.1",
|
|
94
94
|
"fast-glob": "^3.2.11",
|
|
95
95
|
"http-proxy": "^1.18.1",
|
|
96
|
-
"json5": "^2.2.
|
|
96
|
+
"json5": "^2.2.1",
|
|
97
97
|
"launch-editor-middleware": "^2.3.0",
|
|
98
98
|
"magic-string": "^0.26.1",
|
|
99
99
|
"micromatch": "^4.0.4",
|
|
100
100
|
"mrmime": "^1.0.0",
|
|
101
|
-
"node-forge": "^1.
|
|
101
|
+
"node-forge": "^1.3.0",
|
|
102
102
|
"okie": "^1.0.1",
|
|
103
103
|
"open": "^8.4.0",
|
|
104
104
|
"periscopic": "^2.0.3",
|
|
@@ -109,10 +109,11 @@
|
|
|
109
109
|
"resolve.exports": "^1.1.0",
|
|
110
110
|
"rollup-plugin-license": "^2.6.1",
|
|
111
111
|
"sirv": "^2.0.2",
|
|
112
|
+
"source-map-js": "^1.0.2",
|
|
112
113
|
"source-map-support": "^0.5.21",
|
|
113
114
|
"strip-ansi": "^6.0.1",
|
|
114
115
|
"terser": "^5.12.1",
|
|
115
|
-
"tsconfck": "^1.2.
|
|
116
|
+
"tsconfck": "^1.2.1",
|
|
116
117
|
"tslib": "^2.3.1",
|
|
117
118
|
"types": "link:./types",
|
|
118
119
|
"ws": "^8.5.0"
|