vite 3.2.0-beta.1 → 3.2.0-beta.3
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.
- package/LICENSE.md +82 -29
- package/bin/openChrome.applescript +32 -23
- package/dist/node/chunks/{dep-34b5a6bf.js → dep-5fd8eb18.js} +1993 -267
- package/dist/node/chunks/{dep-39e6741e.js → dep-9deb2354.js} +0 -0
- package/dist/node/chunks/{dep-46ac452b.js → dep-ea6d21e3.js} +1 -1
- package/dist/node/cli.js +19 -7
- package/dist/node/constants.js +1 -1
- package/dist/node/index.d.ts +9 -3
- package/dist/node/index.js +4 -3
- package/dist/node-cjs/publicUtils.cjs +1 -1
- package/package.json +10 -9
|
File without changes
|
package/dist/node/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { performance } from 'node:perf_hooks';
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
|
-
import { y as picocolors, u as createLogger, e as resolveConfig } from './chunks/dep-
|
|
3
|
+
import { y as picocolors, u as createLogger, e as resolveConfig } from './chunks/dep-5fd8eb18.js';
|
|
4
4
|
import { VERSION } from './constants.js';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:path';
|
|
@@ -8,6 +8,9 @@ import 'node:url';
|
|
|
8
8
|
import 'node:module';
|
|
9
9
|
import 'tty';
|
|
10
10
|
import 'esbuild';
|
|
11
|
+
import 'node:assert';
|
|
12
|
+
import 'node:process';
|
|
13
|
+
import 'node:util';
|
|
11
14
|
import 'path';
|
|
12
15
|
import 'fs';
|
|
13
16
|
import 'assert';
|
|
@@ -20,11 +23,9 @@ import 'os';
|
|
|
20
23
|
import 'child_process';
|
|
21
24
|
import 'node:os';
|
|
22
25
|
import 'node:crypto';
|
|
23
|
-
import 'node:util';
|
|
24
26
|
import 'node:dns';
|
|
25
27
|
import 'resolve';
|
|
26
28
|
import 'crypto';
|
|
27
|
-
import 'buffer';
|
|
28
29
|
import 'node:buffer';
|
|
29
30
|
import 'module';
|
|
30
31
|
import 'worker_threads';
|
|
@@ -652,6 +653,13 @@ class CAC extends EventEmitter {
|
|
|
652
653
|
const cac = (name = "") => new CAC(name);
|
|
653
654
|
|
|
654
655
|
const cli = cac('vite');
|
|
656
|
+
const filterDuplicateOptions = (options) => {
|
|
657
|
+
for (const [key, value] of Object.entries(options)) {
|
|
658
|
+
if (Array.isArray(value)) {
|
|
659
|
+
options[key] = value[value.length - 1];
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
};
|
|
655
663
|
/**
|
|
656
664
|
* removing global flags before passing as command specific sub-configs
|
|
657
665
|
*/
|
|
@@ -693,9 +701,10 @@ cli
|
|
|
693
701
|
.option('--strictPort', `[boolean] exit if specified port is already in use`)
|
|
694
702
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
695
703
|
.action(async (root, options) => {
|
|
704
|
+
filterDuplicateOptions(options);
|
|
696
705
|
// output structure is preserved even after bundling so require()
|
|
697
706
|
// is ok here
|
|
698
|
-
const { createServer } = await import('./chunks/dep-
|
|
707
|
+
const { createServer } = await import('./chunks/dep-5fd8eb18.js').then(function (n) { return n.C; });
|
|
699
708
|
try {
|
|
700
709
|
const server = await createServer({
|
|
701
710
|
root,
|
|
@@ -742,7 +751,8 @@ cli
|
|
|
742
751
|
.option('--emptyOutDir', `[boolean] force empty outDir when it's outside of root`)
|
|
743
752
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
744
753
|
.action(async (root, options) => {
|
|
745
|
-
|
|
754
|
+
filterDuplicateOptions(options);
|
|
755
|
+
const { build } = await import('./chunks/dep-5fd8eb18.js').then(function (n) { return n.B; });
|
|
746
756
|
const buildOptions = cleanOptions(options);
|
|
747
757
|
try {
|
|
748
758
|
await build({
|
|
@@ -766,7 +776,8 @@ cli
|
|
|
766
776
|
.command('optimize [root]', 'pre-bundle dependencies')
|
|
767
777
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
768
778
|
.action(async (root, options) => {
|
|
769
|
-
|
|
779
|
+
filterDuplicateOptions(options);
|
|
780
|
+
const { optimizeDeps } = await import('./chunks/dep-5fd8eb18.js').then(function (n) { return n.A; });
|
|
770
781
|
try {
|
|
771
782
|
const config = await resolveConfig({
|
|
772
783
|
root,
|
|
@@ -789,7 +800,8 @@ cli
|
|
|
789
800
|
.option('--https', `[boolean] use TLS + HTTP/2`)
|
|
790
801
|
.option('--open [path]', `[boolean | string] open browser on startup`)
|
|
791
802
|
.action(async (root, options) => {
|
|
792
|
-
|
|
803
|
+
filterDuplicateOptions(options);
|
|
804
|
+
const { preview } = await import('./chunks/dep-5fd8eb18.js').then(function (n) { return n.D; });
|
|
793
805
|
try {
|
|
794
806
|
const server = await preview({
|
|
795
807
|
root,
|
package/dist/node/constants.js
CHANGED
package/dist/node/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import { GeneralImportGlobOptions } from "../../types/importGlob";
|
|
|
22
22
|
import type { GetManualChunk } from 'rollup';
|
|
23
23
|
import { HMRPayload } from "../../types/hmrPayload";
|
|
24
24
|
import * as http from 'node:http';
|
|
25
|
+
import type { Http2SecureServer } from 'node:http2';
|
|
25
26
|
import { ImportGlobEagerFunction } from "../../types/importGlob";
|
|
26
27
|
import { ImportGlobFunction } from "../../types/importGlob";
|
|
27
28
|
import { ImportGlobOptions } from "../../types/importGlob";
|
|
@@ -1544,7 +1545,7 @@ export declare interface PreviewServer {
|
|
|
1544
1545
|
/**
|
|
1545
1546
|
* native Node http server instance
|
|
1546
1547
|
*/
|
|
1547
|
-
httpServer: http.Server;
|
|
1548
|
+
httpServer: http.Server | Http2SecureServer;
|
|
1548
1549
|
/**
|
|
1549
1550
|
* The resolved urls Vite prints on the CLI
|
|
1550
1551
|
*/
|
|
@@ -1557,7 +1558,7 @@ export declare interface PreviewServer {
|
|
|
1557
1558
|
|
|
1558
1559
|
export declare type PreviewServerHook = (this: void, server: {
|
|
1559
1560
|
middlewares: Connect.Server;
|
|
1560
|
-
httpServer: http.Server;
|
|
1561
|
+
httpServer: http.Server | Http2SecureServer;
|
|
1561
1562
|
}) => (() => void) | void | Promise<(() => void) | void>;
|
|
1562
1563
|
|
|
1563
1564
|
export declare interface ProxyOptions extends HttpProxy.ServerOptions {
|
|
@@ -2470,7 +2471,7 @@ export declare interface ViteDevServer {
|
|
|
2470
2471
|
* native Node http server instance
|
|
2471
2472
|
* will be null in middleware mode
|
|
2472
2473
|
*/
|
|
2473
|
-
httpServer: http.Server | null;
|
|
2474
|
+
httpServer: http.Server | Http2SecureServer | null;
|
|
2474
2475
|
/**
|
|
2475
2476
|
* chokidar watcher instance
|
|
2476
2477
|
* https://github.com/paulmillr/chokidar#api
|
|
@@ -2521,6 +2522,11 @@ export declare interface ViteDevServer {
|
|
|
2521
2522
|
* Mutates the given SSR error by rewriting the stacktrace
|
|
2522
2523
|
*/
|
|
2523
2524
|
ssrFixStacktrace(e: Error): void;
|
|
2525
|
+
/**
|
|
2526
|
+
* Triggers HMR for a module in the module graph. You can use the `server.moduleGraph`
|
|
2527
|
+
* API to retrieve the module to be reloaded. If `hmr` is false, this is a no-op.
|
|
2528
|
+
*/
|
|
2529
|
+
reloadModule(module: ModuleNode): Promise<void>;
|
|
2524
2530
|
/**
|
|
2525
2531
|
* Start the server.
|
|
2526
2532
|
*/
|
package/dist/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as build, k as createFilter, u as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, h as getDepOptimizationConfig, i as isDepsOptimizerEnabled, l as loadConfigFromFile, w as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, p as preview, g as resolveBaseUrl, e as resolveConfig, x as resolveEnvPrefix, a as resolvePackageData, r as resolvePackageEntry, v as searchForWorkspaceRoot, q as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
|
1
|
+
export { b as build, k as createFilter, u as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, h as getDepOptimizationConfig, i as isDepsOptimizerEnabled, l as loadConfigFromFile, w as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, p as preview, g as resolveBaseUrl, e as resolveConfig, x as resolveEnvPrefix, a as resolvePackageData, r as resolvePackageEntry, v as searchForWorkspaceRoot, q as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-5fd8eb18.js';
|
|
2
2
|
export { VERSION as version } from './constants.js';
|
|
3
3
|
export { version as esbuildVersion } from 'esbuild';
|
|
4
4
|
export { VERSION as rollupVersion } from 'rollup';
|
|
@@ -8,6 +8,9 @@ import 'node:url';
|
|
|
8
8
|
import 'node:perf_hooks';
|
|
9
9
|
import 'node:module';
|
|
10
10
|
import 'tty';
|
|
11
|
+
import 'node:assert';
|
|
12
|
+
import 'node:process';
|
|
13
|
+
import 'node:util';
|
|
11
14
|
import 'path';
|
|
12
15
|
import 'fs';
|
|
13
16
|
import 'events';
|
|
@@ -21,11 +24,9 @@ import 'os';
|
|
|
21
24
|
import 'child_process';
|
|
22
25
|
import 'node:os';
|
|
23
26
|
import 'node:crypto';
|
|
24
|
-
import 'node:util';
|
|
25
27
|
import 'node:dns';
|
|
26
28
|
import 'resolve';
|
|
27
29
|
import 'crypto';
|
|
28
|
-
import 'buffer';
|
|
29
30
|
import 'node:buffer';
|
|
30
31
|
import 'module';
|
|
31
32
|
import 'worker_threads';
|
|
@@ -31,7 +31,7 @@ var require$$1__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$1$1);
|
|
|
31
31
|
var readline__default = /*#__PURE__*/_interopDefaultLegacy(readline);
|
|
32
32
|
var require$$2__default = /*#__PURE__*/_interopDefaultLegacy(require$$2);
|
|
33
33
|
|
|
34
|
-
var version = "3.2.0-beta.
|
|
34
|
+
var version = "3.2.0-beta.3";
|
|
35
35
|
|
|
36
36
|
const VERSION = version;
|
|
37
37
|
const VITE_PACKAGE_DIR = path$3.resolve(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "3.2.0-beta.
|
|
3
|
+
"version": "3.2.0-beta.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"esbuild": "^0.15.9",
|
|
63
|
-
"postcss": "^8.4.
|
|
63
|
+
"postcss": "^8.4.18",
|
|
64
64
|
"resolve": "^1.22.1",
|
|
65
65
|
"rollup": "^2.79.1"
|
|
66
66
|
},
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@ampproject/remapping": "^2.2.0",
|
|
72
|
-
"@babel/parser": "^7.19.
|
|
73
|
-
"@babel/types": "^7.19.
|
|
74
|
-
"@jridgewell/trace-mapping": "^0.3.
|
|
72
|
+
"@babel/parser": "^7.19.4",
|
|
73
|
+
"@babel/types": "^7.19.4",
|
|
74
|
+
"@jridgewell/trace-mapping": "^0.3.17",
|
|
75
75
|
"@rollup/plugin-alias": "^4.0.0",
|
|
76
76
|
"@rollup/plugin-commonjs": "^22.0.2",
|
|
77
77
|
"@rollup/plugin-dynamic-import-vars": "^1.4.4",
|
|
@@ -84,17 +84,19 @@
|
|
|
84
84
|
"chokidar": "^3.5.3",
|
|
85
85
|
"connect": "^3.7.0",
|
|
86
86
|
"connect-history-api-fallback": "^2.0.0",
|
|
87
|
-
"convert-source-map": "^1.
|
|
87
|
+
"convert-source-map": "^1.9.0",
|
|
88
88
|
"cors": "^2.8.5",
|
|
89
89
|
"cross-spawn": "^7.0.3",
|
|
90
90
|
"debug": "^4.3.4",
|
|
91
|
+
"dep-types": "link:./src/types",
|
|
91
92
|
"dotenv": "^14.3.2",
|
|
92
93
|
"dotenv-expand": "^5.1.0",
|
|
93
|
-
"es-module-lexer": "^1.0.
|
|
94
|
+
"es-module-lexer": "^1.0.5",
|
|
94
95
|
"estree-walker": "^3.0.1",
|
|
95
96
|
"etag": "^1.8.1",
|
|
96
97
|
"fast-glob": "^3.2.12",
|
|
97
98
|
"http-proxy": "^1.18.1",
|
|
99
|
+
"import-meta-resolve": "^2.1.0",
|
|
98
100
|
"json5": "^2.2.1",
|
|
99
101
|
"launch-editor-middleware": "^2.6.0",
|
|
100
102
|
"magic-string": "^0.26.7",
|
|
@@ -118,9 +120,8 @@
|
|
|
118
120
|
"strip-literal": "^0.4.2",
|
|
119
121
|
"tsconfck": "^2.0.1",
|
|
120
122
|
"tslib": "^2.4.0",
|
|
121
|
-
"dep-types": "link:./src/types",
|
|
122
123
|
"types": "link:./types",
|
|
123
|
-
"ufo": "^0.8.
|
|
124
|
+
"ufo": "^0.8.6",
|
|
124
125
|
"ws": "^8.9.0"
|
|
125
126
|
},
|
|
126
127
|
"peerDependencies": {
|