vite 2.9.7 → 2.9.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/LICENSE.md +29 -0
- package/dist/node/chunks/{dep-0429b5b4.js → dep-469bebd5.js} +1 -1
- package/dist/node/chunks/{dep-c7a54f50.js → dep-66809c96.js} +1 -1
- package/dist/node/chunks/{dep-fb8c3a62.js → dep-93ae8604.js} +13 -13
- package/dist/node/chunks/{dep-88bd5805.js → dep-9e5491c9.js} +46078 -46040
- package/dist/node/cli.js +16 -16
- package/dist/node/index.d.ts +15 -1
- package/dist/node/index.js +13 -13
- package/package.json +2 -1
- package/types/shims.d.ts +1 -1
- package/types/ws.d.ts +2 -2
package/dist/node/cli.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var require$$0 = require('events');
|
|
4
|
-
var index = require('./chunks/dep-88bd5805.js');
|
|
5
3
|
var perf_hooks = require('perf_hooks');
|
|
4
|
+
var require$$0 = require('events');
|
|
5
|
+
var index = require('./chunks/dep-9e5491c9.js');
|
|
6
6
|
require('fs');
|
|
7
7
|
require('path');
|
|
8
|
+
require('url');
|
|
8
9
|
require('tty');
|
|
10
|
+
require('os');
|
|
11
|
+
require('esbuild');
|
|
12
|
+
require('assert');
|
|
13
|
+
require('resolve');
|
|
9
14
|
require('util');
|
|
15
|
+
require('stream');
|
|
10
16
|
require('net');
|
|
11
|
-
require('url');
|
|
12
17
|
require('http');
|
|
13
|
-
require('
|
|
14
|
-
require('os');
|
|
15
|
-
require('resolve');
|
|
18
|
+
require('child_process');
|
|
16
19
|
require('module');
|
|
17
|
-
require('https');
|
|
18
|
-
require('zlib');
|
|
19
20
|
require('crypto');
|
|
20
|
-
require('tls');
|
|
21
|
-
require('assert');
|
|
22
|
-
require('esbuild');
|
|
23
21
|
require('buffer');
|
|
24
22
|
require('querystring');
|
|
25
|
-
require('
|
|
23
|
+
require('zlib');
|
|
24
|
+
require('https');
|
|
25
|
+
require('tls');
|
|
26
26
|
require('worker_threads');
|
|
27
27
|
require('readline');
|
|
28
28
|
|
|
@@ -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-9e5491c9.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-9e5491c9.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-9e5491c9.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-9e5491c9.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
|
@@ -613,7 +613,7 @@ export declare interface DepOptimizationResult {
|
|
|
613
613
|
* the page reload will be delayed until the next rerun so we need
|
|
614
614
|
* to be able to discard the result
|
|
615
615
|
*/
|
|
616
|
-
commit: () => void
|
|
616
|
+
commit: () => Promise<void>;
|
|
617
617
|
cancel: () => void;
|
|
618
618
|
}
|
|
619
619
|
|
|
@@ -1309,6 +1309,15 @@ export declare interface Plugin extends Plugin_2 {
|
|
|
1309
1309
|
* are applied. Hook can be async functions and will be called in series.
|
|
1310
1310
|
*/
|
|
1311
1311
|
configureServer?: ServerHook;
|
|
1312
|
+
/**
|
|
1313
|
+
* Configure the preview server. The hook receives the connect server and
|
|
1314
|
+
* its underlying http server.
|
|
1315
|
+
*
|
|
1316
|
+
* The hooks are called before other middlewares are applied. A hook can
|
|
1317
|
+
* return a post hook that will be called after other middlewares are
|
|
1318
|
+
* applied. Hooks can be async functions and will be called in series.
|
|
1319
|
+
*/
|
|
1320
|
+
configurePreviewServer?: PreviewServerHook;
|
|
1312
1321
|
/**
|
|
1313
1322
|
* Transform index.html.
|
|
1314
1323
|
* The hook receives the following arguments:
|
|
@@ -1402,6 +1411,11 @@ export declare interface PreviewServer {
|
|
|
1402
1411
|
printUrls: () => void;
|
|
1403
1412
|
}
|
|
1404
1413
|
|
|
1414
|
+
export declare type PreviewServerHook = (server: {
|
|
1415
|
+
middlewares: Connect.Server;
|
|
1416
|
+
httpServer: http.Server;
|
|
1417
|
+
}) => (() => void) | void | Promise<(() => void) | void>;
|
|
1418
|
+
|
|
1405
1419
|
/**
|
|
1406
1420
|
* @deprecated Use `server.printUrls()` instead
|
|
1407
1421
|
*/
|
package/dist/node/index.js
CHANGED
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./chunks/dep-
|
|
5
|
+
var index = require('./chunks/dep-9e5491c9.js');
|
|
6
6
|
require('fs');
|
|
7
7
|
require('path');
|
|
8
|
+
require('url');
|
|
9
|
+
require('perf_hooks');
|
|
8
10
|
require('tty');
|
|
11
|
+
require('os');
|
|
12
|
+
require('esbuild');
|
|
13
|
+
require('events');
|
|
14
|
+
require('assert');
|
|
15
|
+
require('resolve');
|
|
9
16
|
require('util');
|
|
17
|
+
require('stream');
|
|
10
18
|
require('net');
|
|
11
|
-
require('events');
|
|
12
|
-
require('url');
|
|
13
19
|
require('http');
|
|
14
|
-
require('
|
|
15
|
-
require('os');
|
|
16
|
-
require('resolve');
|
|
20
|
+
require('child_process');
|
|
17
21
|
require('module');
|
|
18
|
-
require('perf_hooks');
|
|
19
|
-
require('https');
|
|
20
|
-
require('zlib');
|
|
21
22
|
require('crypto');
|
|
22
|
-
require('tls');
|
|
23
|
-
require('assert');
|
|
24
|
-
require('esbuild');
|
|
25
23
|
require('buffer');
|
|
26
24
|
require('querystring');
|
|
27
|
-
require('
|
|
25
|
+
require('zlib');
|
|
26
|
+
require('https');
|
|
27
|
+
require('tls');
|
|
28
28
|
require('worker_threads');
|
|
29
29
|
require('readline');
|
|
30
30
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Evan You",
|
|
6
6
|
"description": "Native-ESM powered web dev build tool",
|
|
@@ -112,6 +112,7 @@
|
|
|
112
112
|
"source-map-js": "^1.0.2",
|
|
113
113
|
"source-map-support": "^0.5.21",
|
|
114
114
|
"strip-ansi": "^6.0.1",
|
|
115
|
+
"strip-literal": "^0.2.0",
|
|
115
116
|
"terser": "^5.13.1",
|
|
116
117
|
"tsconfck": "^1.2.2",
|
|
117
118
|
"tslib": "^2.4.0",
|
package/types/shims.d.ts
CHANGED
package/types/ws.d.ts
CHANGED
|
@@ -20,9 +20,9 @@ import type {
|
|
|
20
20
|
Agent,
|
|
21
21
|
ClientRequest,
|
|
22
22
|
ClientRequestArgs,
|
|
23
|
+
Server as HTTPServer,
|
|
23
24
|
IncomingMessage,
|
|
24
|
-
OutgoingHttpHeaders
|
|
25
|
-
Server as HTTPServer
|
|
25
|
+
OutgoingHttpHeaders
|
|
26
26
|
} from 'http'
|
|
27
27
|
import type { Server as HTTPSServer } from 'https'
|
|
28
28
|
import type { Duplex, DuplexOptions } from 'stream'
|