vite 2.8.0-beta.7 → 2.8.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.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
- package/LICENSE.md +56 -1
- package/dist/node/chunks/{dep-6a30742f.js → dep-8a5027b8.js} +1 -1
- package/dist/node/chunks/{dep-752d5fd3.js → dep-cc251a32.js} +1 -1
- package/dist/node/chunks/{dep-9e561a04.js → dep-d44e59ba.js} +21 -16
- package/dist/node/chunks/{dep-0ebab0df.js → dep-ec2e68f4.js} +0 -0
- package/dist/node/chunks/{dep-c9c9d3e5.js → dep-f9d9421a.js} +620 -572
- package/dist/node/cli.js +8 -7
- package/dist/node/index.d.ts +5 -5
- package/dist/node/index.js +1 -1
- package/package.json +11 -12
- package/types/importMeta.d.ts +4 -14
- package/CHANGELOG.md +0 -2784
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-f9d9421a.js');
|
|
5
5
|
var perf_hooks = require('perf_hooks');
|
|
6
6
|
require('fs');
|
|
7
7
|
require('path');
|
|
@@ -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-f9d9421a.js'); }).then(function (n) { return n.index$1; });
|
|
687
687
|
try {
|
|
688
688
|
const server = await createServer({
|
|
689
689
|
root,
|
|
@@ -727,12 +727,12 @@ cli
|
|
|
727
727
|
.option('--sourcemap', `[boolean] output source maps for build (default: false)`)
|
|
728
728
|
.option('--minify [minifier]', `[boolean | "terser" | "esbuild"] enable/disable minification, ` +
|
|
729
729
|
`or specify minifier to use (default: esbuild)`)
|
|
730
|
-
.option('--manifest', `[boolean] emit build manifest json`)
|
|
731
|
-
.option('--ssrManifest', `[boolean] emit ssr manifest json`)
|
|
730
|
+
.option('--manifest [name]', `[boolean | string] emit build manifest json`)
|
|
731
|
+
.option('--ssrManifest [name]', `[boolean | string] emit ssr manifest json`)
|
|
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: build$1 } = await Promise.resolve().then(function () { return require('./chunks/dep-
|
|
735
|
+
const { build: build$1 } = await Promise.resolve().then(function () { return require('./chunks/dep-f9d9421a.js'); }).then(function (n) { return n.build$1; });
|
|
736
736
|
const buildOptions = cleanOptions(options);
|
|
737
737
|
try {
|
|
738
738
|
await build$1({
|
|
@@ -755,7 +755,7 @@ cli
|
|
|
755
755
|
.command('optimize [root]')
|
|
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-f9d9421a.js'); }).then(function (n) { return n.index; });
|
|
759
759
|
try {
|
|
760
760
|
const config = await build.resolveConfig({
|
|
761
761
|
root,
|
|
@@ -778,8 +778,9 @@ 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-f9d9421a.js'); }).then(function (n) { return n.preview$1; });
|
|
781
782
|
try {
|
|
782
|
-
const server = await
|
|
783
|
+
const server = await preview({
|
|
783
784
|
root,
|
|
784
785
|
base: options.base,
|
|
785
786
|
configFile: options.config,
|
package/dist/node/index.d.ts
CHANGED
|
@@ -43,8 +43,8 @@ import type * as stream from 'stream';
|
|
|
43
43
|
import type { TransformPluginContext } from 'rollup';
|
|
44
44
|
import type { TransformResult as TransformResult_2 } from 'esbuild';
|
|
45
45
|
import type { TransformResult as TransformResult_3 } from 'rollup';
|
|
46
|
-
import type { URL } from 'url';
|
|
47
46
|
import type * as url from 'url';
|
|
47
|
+
import type { URL as URL_2 } from 'url';
|
|
48
48
|
import type { WatcherOptions } from 'rollup';
|
|
49
49
|
import type { ZlibOptions } from 'zlib';
|
|
50
50
|
|
|
@@ -227,7 +227,7 @@ export declare interface BuildOptions {
|
|
|
227
227
|
* ```
|
|
228
228
|
* @default false
|
|
229
229
|
*/
|
|
230
|
-
manifest?: boolean;
|
|
230
|
+
manifest?: boolean | string;
|
|
231
231
|
/**
|
|
232
232
|
* Build in library mode. The value should be the global name of the lib in
|
|
233
233
|
* UMD mode. This will produce esm + cjs + umd bundle formats with default
|
|
@@ -243,7 +243,7 @@ export declare interface BuildOptions {
|
|
|
243
243
|
* Generate SSR manifest for determining style links and asset preload
|
|
244
244
|
* directives in production.
|
|
245
245
|
*/
|
|
246
|
-
ssrManifest?: boolean;
|
|
246
|
+
ssrManifest?: boolean | string;
|
|
247
247
|
/**
|
|
248
248
|
* Set to false to disable reporting compressed chunk sizes.
|
|
249
249
|
* Can slightly improve build speed.
|
|
@@ -2262,11 +2262,11 @@ export declare class WebSocket extends EventEmitter {
|
|
|
2262
2262
|
onmessage: (event: WebSocket.MessageEvent) => void
|
|
2263
2263
|
|
|
2264
2264
|
constructor(
|
|
2265
|
-
address: string |
|
|
2265
|
+
address: string | URL_2,
|
|
2266
2266
|
options?: WebSocket.ClientOptions | ClientRequestArgs
|
|
2267
2267
|
)
|
|
2268
2268
|
constructor(
|
|
2269
|
-
address: string |
|
|
2269
|
+
address: string | URL_2,
|
|
2270
2270
|
protocols?: string | string[],
|
|
2271
2271
|
options?: WebSocket.ClientOptions | ClientRequestArgs
|
|
2272
2272
|
)
|
package/dist/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Evan You",
|
|
6
6
|
"description": "Native-ESM powered web dev build tool",
|
|
@@ -39,13 +39,12 @@
|
|
|
39
39
|
"roll-types": "api-extractor run && rimraf temp",
|
|
40
40
|
"lint": "eslint --ext .ts src/**",
|
|
41
41
|
"format": "prettier --write --parser typescript \"src/**/*.ts\"",
|
|
42
|
-
"
|
|
43
|
-
"release": "ts-node ../../scripts/release.ts"
|
|
42
|
+
"prepublishOnly": "npm run build"
|
|
44
43
|
},
|
|
45
44
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
|
46
45
|
"dependencies": {
|
|
47
46
|
"esbuild": "^0.14.14",
|
|
48
|
-
"postcss": "^8.4.
|
|
47
|
+
"postcss": "^8.4.6",
|
|
49
48
|
"resolve": "^1.22.0",
|
|
50
49
|
"rollup": "^2.59.0"
|
|
51
50
|
},
|
|
@@ -53,9 +52,9 @@
|
|
|
53
52
|
"fsevents": "~2.3.2"
|
|
54
53
|
},
|
|
55
54
|
"devDependencies": {
|
|
56
|
-
"@ampproject/remapping": "^
|
|
57
|
-
"@babel/parser": "^7.
|
|
58
|
-
"@babel/types": "^7.
|
|
55
|
+
"@ampproject/remapping": "^2.1.0",
|
|
56
|
+
"@babel/parser": "^7.17.0",
|
|
57
|
+
"@babel/types": "^7.17.0",
|
|
59
58
|
"@rollup/plugin-alias": "^3.1.9",
|
|
60
59
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
61
60
|
"@rollup/plugin-dynamic-import-vars": "^1.4.2",
|
|
@@ -66,17 +65,17 @@
|
|
|
66
65
|
"@types/convert-source-map": "^1.5.2",
|
|
67
66
|
"@types/cross-spawn": "^6.0.2",
|
|
68
67
|
"@types/debug": "^4.1.7",
|
|
69
|
-
"@types/estree": "^0.0.
|
|
68
|
+
"@types/estree": "^0.0.51",
|
|
70
69
|
"@types/etag": "^1.8.1",
|
|
71
70
|
"@types/less": "^3.0.3",
|
|
72
71
|
"@types/micromatch": "^4.0.2",
|
|
73
72
|
"@types/mime": "^2.0.3",
|
|
74
|
-
"@types/node": "^16.11.
|
|
73
|
+
"@types/node": "^16.11.22",
|
|
75
74
|
"@types/resolve": "^1.20.1",
|
|
76
75
|
"@types/sass": "~1.43.1",
|
|
77
76
|
"@types/stylus": "^0.48.36",
|
|
78
77
|
"@types/ws": "^8.2.2",
|
|
79
|
-
"@vue/compiler-dom": "^3.2.
|
|
78
|
+
"@vue/compiler-dom": "^3.2.30",
|
|
80
79
|
"acorn": "^8.7.0",
|
|
81
80
|
"cac": "6.7.9",
|
|
82
81
|
"chokidar": "^3.5.3",
|
|
@@ -88,7 +87,7 @@
|
|
|
88
87
|
"cross-spawn": "^7.0.3",
|
|
89
88
|
"debug": "^4.3.3",
|
|
90
89
|
"dotenv": "^14.3.2",
|
|
91
|
-
"dotenv-expand": "^
|
|
90
|
+
"dotenv-expand": "^5.1.0",
|
|
92
91
|
"es-module-lexer": "^0.9.3",
|
|
93
92
|
"estree-walker": "^2.0.2",
|
|
94
93
|
"etag": "^1.8.1",
|
|
@@ -117,7 +116,7 @@
|
|
|
117
116
|
"tsconfck": "1.1.2",
|
|
118
117
|
"tslib": "^2.3.1",
|
|
119
118
|
"types": "link:./types",
|
|
120
|
-
"ws": "^8.
|
|
119
|
+
"ws": "^8.5.0"
|
|
121
120
|
},
|
|
122
121
|
"peerDependencies": {
|
|
123
122
|
"less": "*",
|
package/types/importMeta.d.ts
CHANGED
|
@@ -59,25 +59,15 @@ interface ImportMeta {
|
|
|
59
59
|
|
|
60
60
|
readonly env: ImportMetaEnv
|
|
61
61
|
|
|
62
|
-
glob(
|
|
62
|
+
glob<Module = { [key: string]: any }>(
|
|
63
63
|
pattern: string,
|
|
64
64
|
options?: AssertOptions
|
|
65
|
-
): Record<
|
|
66
|
-
string,
|
|
67
|
-
() => Promise<{
|
|
68
|
-
[key: string]: any
|
|
69
|
-
}>
|
|
70
|
-
>
|
|
65
|
+
): Record<string, () => Promise<Module>>
|
|
71
66
|
|
|
72
|
-
globEager(
|
|
67
|
+
globEager<Module = { [key: string]: any }>(
|
|
73
68
|
pattern: string,
|
|
74
69
|
options?: AssertOptions
|
|
75
|
-
): Record<
|
|
76
|
-
string,
|
|
77
|
-
{
|
|
78
|
-
[key: string]: any
|
|
79
|
-
}
|
|
80
|
-
>
|
|
70
|
+
): Record<string, Module>
|
|
81
71
|
}
|
|
82
72
|
|
|
83
73
|
interface ImportMetaEnv {
|