vite 5.0.0-beta.1 → 5.0.0-beta.11
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 +74 -3
- package/client.d.ts +8 -56
- package/dist/client/client.mjs +17 -0
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-6db0c752.js → dep-HpI8v4GP.js} +145 -145
- package/dist/node/chunks/{dep-e31699fa.js → dep-kPX9VBbU.js} +3726 -4094
- package/dist/node/chunks/{dep-c457d7ce.js → dep-rMlk0HEr.js} +2 -2
- package/dist/node/cli.js +15 -13
- package/dist/node/index.d.ts +3274 -3503
- package/dist/node/index.js +8 -6
- package/dist/node-cjs/publicUtils.cjs +816 -510
- package/index.cjs +13 -9
- package/index.d.cts +6 -0
- package/package.json +39 -36
- package/types/hot.d.ts +4 -0
- package/types/import-meta.d.ts +5 -0
- /package/dist/node/chunks/{dep-c423598f.js → dep-8a-6Quh6.js} +0 -0
- /package/dist/node/chunks/{dep-f0c7dae0.js → dep-kjUoH5nk.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { y as getDefaultExportFromCjs } from './dep-kPX9VBbU.js';
|
|
2
2
|
import require$$0 from 'path';
|
|
3
3
|
import require$$0__default from 'fs';
|
|
4
|
-
import { l as lib } from './dep-
|
|
4
|
+
import { l as lib } from './dep-8a-6Quh6.js';
|
|
5
5
|
|
|
6
6
|
import { fileURLToPath as __cjs_fileURLToPath } from 'node:url';
|
|
7
7
|
import { dirname as __cjs_dirname } from 'node:path';
|
package/dist/node/cli.js
CHANGED
|
@@ -2,7 +2,7 @@ import path from 'node:path';
|
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import { performance } from 'node:perf_hooks';
|
|
4
4
|
import { EventEmitter } from 'events';
|
|
5
|
-
import {
|
|
5
|
+
import { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-kPX9VBbU.js';
|
|
6
6
|
import { VERSION } from './constants.js';
|
|
7
7
|
import 'node:fs/promises';
|
|
8
8
|
import 'node:url';
|
|
@@ -13,6 +13,7 @@ import 'esbuild';
|
|
|
13
13
|
import 'path';
|
|
14
14
|
import 'fs';
|
|
15
15
|
import 'assert';
|
|
16
|
+
import 'node:http';
|
|
16
17
|
import 'util';
|
|
17
18
|
import 'net';
|
|
18
19
|
import 'url';
|
|
@@ -31,16 +32,17 @@ import 'node:assert';
|
|
|
31
32
|
import 'node:process';
|
|
32
33
|
import 'node:v8';
|
|
33
34
|
import 'rollup';
|
|
34
|
-
import '
|
|
35
|
-
import '
|
|
35
|
+
import 'rollup/parseAst';
|
|
36
|
+
import 'querystring';
|
|
37
|
+
import 'node:readline';
|
|
38
|
+
import 'node:events';
|
|
36
39
|
import 'node:https';
|
|
37
40
|
import 'zlib';
|
|
38
41
|
import 'buffer';
|
|
39
42
|
import 'https';
|
|
40
43
|
import 'tls';
|
|
41
|
-
import 'querystring';
|
|
42
|
-
import 'node:readline';
|
|
43
44
|
import 'node:zlib';
|
|
45
|
+
import 'worker_threads';
|
|
44
46
|
|
|
45
47
|
function toArr(any) {
|
|
46
48
|
return any == null ? [] : Array.isArray(any) ? any : [any];
|
|
@@ -749,7 +751,6 @@ cli
|
|
|
749
751
|
.alias('dev') // alias to align with the script name
|
|
750
752
|
.option('--host [host]', `[string] specify hostname`, { type: [convertHost] })
|
|
751
753
|
.option('--port <port>', `[number] specify port`)
|
|
752
|
-
.option('--https', `[boolean] use TLS + HTTP/2`)
|
|
753
754
|
.option('--open [path]', `[boolean | string] open browser on startup`)
|
|
754
755
|
.option('--cors', `[boolean] enable CORS`)
|
|
755
756
|
.option('--strictPort', `[boolean] exit if specified port is already in use`)
|
|
@@ -758,7 +759,7 @@ cli
|
|
|
758
759
|
filterDuplicateOptions(options);
|
|
759
760
|
// output structure is preserved even after bundling so require()
|
|
760
761
|
// is ok here
|
|
761
|
-
const { createServer } = await import('./chunks/dep-
|
|
762
|
+
const { createServer } = await import('./chunks/dep-kPX9VBbU.js').then(function (n) { return n.C; });
|
|
762
763
|
try {
|
|
763
764
|
const server = await createServer({
|
|
764
765
|
root,
|
|
@@ -779,7 +780,10 @@ cli
|
|
|
779
780
|
const startupDurationString = viteStartTime
|
|
780
781
|
? colors.dim(`ready in ${colors.reset(colors.bold(Math.ceil(performance.now() - viteStartTime)))} ms`)
|
|
781
782
|
: '';
|
|
782
|
-
info(`\n ${colors.green(`${colors.bold('VITE')} v${VERSION}`)} ${startupDurationString}\n`, {
|
|
783
|
+
info(`\n ${colors.green(`${colors.bold('VITE')} v${VERSION}`)} ${startupDurationString}\n`, {
|
|
784
|
+
clear: !server.config.logger.hasWarned &&
|
|
785
|
+
!globalThis.__vite_cjs_skip_clear_screen,
|
|
786
|
+
});
|
|
783
787
|
server.printUrls();
|
|
784
788
|
server.bindCLIShortcuts({
|
|
785
789
|
print: true,
|
|
@@ -836,7 +840,7 @@ cli
|
|
|
836
840
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
837
841
|
.action(async (root, options) => {
|
|
838
842
|
filterDuplicateOptions(options);
|
|
839
|
-
const { build } = await import('./chunks/dep-
|
|
843
|
+
const { build } = await import('./chunks/dep-kPX9VBbU.js').then(function (n) { return n.B; });
|
|
840
844
|
const buildOptions = cleanOptions(options);
|
|
841
845
|
try {
|
|
842
846
|
await build({
|
|
@@ -864,7 +868,7 @@ cli
|
|
|
864
868
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
865
869
|
.action(async (root, options) => {
|
|
866
870
|
filterDuplicateOptions(options);
|
|
867
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
|
871
|
+
const { optimizeDeps } = await import('./chunks/dep-kPX9VBbU.js').then(function (n) { return n.A; });
|
|
868
872
|
try {
|
|
869
873
|
const config = await resolveConfig({
|
|
870
874
|
root,
|
|
@@ -886,12 +890,11 @@ cli
|
|
|
886
890
|
.option('--host [host]', `[string] specify hostname`, { type: [convertHost] })
|
|
887
891
|
.option('--port <port>', `[number] specify port`)
|
|
888
892
|
.option('--strictPort', `[boolean] exit if specified port is already in use`)
|
|
889
|
-
.option('--https', `[boolean] use TLS + HTTP/2`)
|
|
890
893
|
.option('--open [path]', `[boolean | string] open browser on startup`)
|
|
891
894
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
|
892
895
|
.action(async (root, options) => {
|
|
893
896
|
filterDuplicateOptions(options);
|
|
894
|
-
const { preview } = await import('./chunks/dep-
|
|
897
|
+
const { preview } = await import('./chunks/dep-kPX9VBbU.js').then(function (n) { return n.D; });
|
|
895
898
|
try {
|
|
896
899
|
const server = await preview({
|
|
897
900
|
root,
|
|
@@ -906,7 +909,6 @@ cli
|
|
|
906
909
|
port: options.port,
|
|
907
910
|
strictPort: options.strictPort,
|
|
908
911
|
host: options.host,
|
|
909
|
-
https: options.https,
|
|
910
912
|
open: options.open,
|
|
911
913
|
},
|
|
912
914
|
});
|