vite 3.2.0-beta.3 → 3.2.0
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/dist/client/client.mjs +1 -1
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-ea6d21e3.js → dep-1180cbc3.js} +1 -1
- package/dist/node/chunks/{dep-5fd8eb18.js → dep-61d2428a.js} +512 -486
- package/dist/node/cli.js +9 -5
- package/dist/node/constants.js +1 -1
- package/dist/node/index.d.ts +22 -4
- package/dist/node/index.js +1 -1
- package/dist/node-cjs/publicUtils.cjs +1 -1
- package/package.json +6 -6
- package/src/client/overlay.ts +1 -1
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 {
|
|
3
|
+
import { z as picocolors, v as createLogger, g as resolveConfig } from './chunks/dep-61d2428a.js';
|
|
4
4
|
import { VERSION } from './constants.js';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:path';
|
|
@@ -704,7 +704,7 @@ cli
|
|
|
704
704
|
filterDuplicateOptions(options);
|
|
705
705
|
// output structure is preserved even after bundling so require()
|
|
706
706
|
// is ok here
|
|
707
|
-
const { createServer } = await import('./chunks/dep-
|
|
707
|
+
const { createServer } = await import('./chunks/dep-61d2428a.js').then(function (n) { return n.D; });
|
|
708
708
|
try {
|
|
709
709
|
const server = await createServer({
|
|
710
710
|
root,
|
|
@@ -752,7 +752,7 @@ cli
|
|
|
752
752
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
753
753
|
.action(async (root, options) => {
|
|
754
754
|
filterDuplicateOptions(options);
|
|
755
|
-
const { build } = await import('./chunks/dep-
|
|
755
|
+
const { build } = await import('./chunks/dep-61d2428a.js').then(function (n) { return n.C; });
|
|
756
756
|
const buildOptions = cleanOptions(options);
|
|
757
757
|
try {
|
|
758
758
|
await build({
|
|
@@ -777,7 +777,7 @@ cli
|
|
|
777
777
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
778
778
|
.action(async (root, options) => {
|
|
779
779
|
filterDuplicateOptions(options);
|
|
780
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
|
780
|
+
const { optimizeDeps } = await import('./chunks/dep-61d2428a.js').then(function (n) { return n.B; });
|
|
781
781
|
try {
|
|
782
782
|
const config = await resolveConfig({
|
|
783
783
|
root,
|
|
@@ -799,9 +799,10 @@ cli
|
|
|
799
799
|
.option('--strictPort', `[boolean] exit if specified port is already in use`)
|
|
800
800
|
.option('--https', `[boolean] use TLS + HTTP/2`)
|
|
801
801
|
.option('--open [path]', `[boolean | string] open browser on startup`)
|
|
802
|
+
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
|
802
803
|
.action(async (root, options) => {
|
|
803
804
|
filterDuplicateOptions(options);
|
|
804
|
-
const { preview } = await import('./chunks/dep-
|
|
805
|
+
const { preview } = await import('./chunks/dep-61d2428a.js').then(function (n) { return n.E; });
|
|
805
806
|
try {
|
|
806
807
|
const server = await preview({
|
|
807
808
|
root,
|
|
@@ -809,6 +810,9 @@ cli
|
|
|
809
810
|
configFile: options.config,
|
|
810
811
|
logLevel: options.logLevel,
|
|
811
812
|
mode: options.mode,
|
|
813
|
+
build: {
|
|
814
|
+
outDir: options.outDir
|
|
815
|
+
},
|
|
812
816
|
preview: {
|
|
813
817
|
port: options.port,
|
|
814
818
|
strictPort: options.strictPort,
|
package/dist/node/constants.js
CHANGED
package/dist/node/index.d.ts
CHANGED
|
@@ -22,7 +22,6 @@ 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';
|
|
26
25
|
import { ImportGlobEagerFunction } from "../../types/importGlob";
|
|
27
26
|
import { ImportGlobFunction } from "../../types/importGlob";
|
|
28
27
|
import { ImportGlobOptions } from "../../types/importGlob";
|
|
@@ -60,6 +59,7 @@ import type { ServerOptions as ServerOptions_2 } from 'node:https';
|
|
|
60
59
|
import type { ServerResponse } from 'node:http';
|
|
61
60
|
import type { SourceDescription } from 'rollup';
|
|
62
61
|
import type { SourceMap } from 'rollup';
|
|
62
|
+
import type { SourceMapInput } from 'rollup';
|
|
63
63
|
import type * as stream from 'node:stream';
|
|
64
64
|
import type { TransformPluginContext } from 'rollup';
|
|
65
65
|
import type { TransformResult as TransformResult_2 } from 'rollup';
|
|
@@ -231,6 +231,12 @@ export declare interface BuildOptions {
|
|
|
231
231
|
* @default true when outDir is a sub directory of project root
|
|
232
232
|
*/
|
|
233
233
|
emptyOutDir?: boolean | null;
|
|
234
|
+
/**
|
|
235
|
+
* Copy the public directory to outDir on write.
|
|
236
|
+
* @default true
|
|
237
|
+
* @experimental
|
|
238
|
+
*/
|
|
239
|
+
copyPublicDir?: boolean;
|
|
234
240
|
/**
|
|
235
241
|
* Whether to emit a manifest.json under assets dir to map hash-less filenames
|
|
236
242
|
* to their hashed versions. Useful when you want to generate your own HTML
|
|
@@ -1529,6 +1535,18 @@ export declare interface PluginHookUtils {
|
|
|
1529
1535
|
|
|
1530
1536
|
export declare type PluginOption = Plugin_2 | false | null | undefined | PluginOption[] | Promise<Plugin_2 | false | null | undefined | PluginOption[]>;
|
|
1531
1537
|
|
|
1538
|
+
/**
|
|
1539
|
+
* @experimental
|
|
1540
|
+
*/
|
|
1541
|
+
export declare function preprocessCSS(code: string, filename: string, config: ResolvedConfig): Promise<PreprocessCSSResult>;
|
|
1542
|
+
|
|
1543
|
+
export declare interface PreprocessCSSResult {
|
|
1544
|
+
code: string;
|
|
1545
|
+
map?: SourceMapInput;
|
|
1546
|
+
modules?: Record<string, string>;
|
|
1547
|
+
deps?: Set<string>;
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1532
1550
|
/**
|
|
1533
1551
|
* Starts the Vite server in preview mode, to simulate a production deployment
|
|
1534
1552
|
*/
|
|
@@ -1545,7 +1563,7 @@ export declare interface PreviewServer {
|
|
|
1545
1563
|
/**
|
|
1546
1564
|
* native Node http server instance
|
|
1547
1565
|
*/
|
|
1548
|
-
httpServer: http.Server
|
|
1566
|
+
httpServer: http.Server;
|
|
1549
1567
|
/**
|
|
1550
1568
|
* The resolved urls Vite prints on the CLI
|
|
1551
1569
|
*/
|
|
@@ -1558,7 +1576,7 @@ export declare interface PreviewServer {
|
|
|
1558
1576
|
|
|
1559
1577
|
export declare type PreviewServerHook = (this: void, server: {
|
|
1560
1578
|
middlewares: Connect.Server;
|
|
1561
|
-
httpServer: http.Server
|
|
1579
|
+
httpServer: http.Server;
|
|
1562
1580
|
}) => (() => void) | void | Promise<(() => void) | void>;
|
|
1563
1581
|
|
|
1564
1582
|
export declare interface ProxyOptions extends HttpProxy.ServerOptions {
|
|
@@ -2471,7 +2489,7 @@ export declare interface ViteDevServer {
|
|
|
2471
2489
|
* native Node http server instance
|
|
2472
2490
|
* will be null in middleware mode
|
|
2473
2491
|
*/
|
|
2474
|
-
httpServer: http.Server |
|
|
2492
|
+
httpServer: http.Server | null;
|
|
2475
2493
|
/**
|
|
2476
2494
|
* chokidar watcher instance
|
|
2477
2495
|
* https://github.com/paulmillr/chokidar#api
|
package/dist/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as build,
|
|
1
|
+
export { b as build, q as createFilter, v as createLogger, c as createServer, e as defineConfig, f as formatPostcssSourceMap, i as getDepOptimizationConfig, j as isDepsOptimizerEnabled, l as loadConfigFromFile, x as loadEnv, k as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, h as resolveBaseUrl, g as resolveConfig, y as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-61d2428a.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';
|
|
@@ -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
|
|
34
|
+
var version = "3.2.0";
|
|
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
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -69,17 +69,17 @@
|
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@ampproject/remapping": "^2.2.0",
|
|
72
|
-
"@babel/parser": "^7.19.
|
|
72
|
+
"@babel/parser": "^7.19.6",
|
|
73
73
|
"@babel/types": "^7.19.4",
|
|
74
74
|
"@jridgewell/trace-mapping": "^0.3.17",
|
|
75
|
-
"@rollup/plugin-alias": "^4.0.
|
|
75
|
+
"@rollup/plugin-alias": "^4.0.2",
|
|
76
76
|
"@rollup/plugin-commonjs": "^22.0.2",
|
|
77
77
|
"@rollup/plugin-dynamic-import-vars": "^1.4.4",
|
|
78
78
|
"@rollup/plugin-json": "^4.1.0",
|
|
79
79
|
"@rollup/plugin-node-resolve": "14.1.0",
|
|
80
80
|
"@rollup/plugin-typescript": "^8.5.0",
|
|
81
81
|
"@rollup/pluginutils": "^4.2.1",
|
|
82
|
-
"acorn": "^8.8.
|
|
82
|
+
"acorn": "^8.8.1",
|
|
83
83
|
"cac": "^6.7.14",
|
|
84
84
|
"chokidar": "^3.5.3",
|
|
85
85
|
"connect": "^3.7.0",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"dep-types": "link:./src/types",
|
|
92
92
|
"dotenv": "^14.3.2",
|
|
93
93
|
"dotenv-expand": "^5.1.0",
|
|
94
|
-
"es-module-lexer": "^1.0
|
|
94
|
+
"es-module-lexer": "^1.1.0",
|
|
95
95
|
"estree-walker": "^3.0.1",
|
|
96
96
|
"etag": "^1.8.1",
|
|
97
97
|
"fast-glob": "^3.2.12",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"tslib": "^2.4.0",
|
|
123
123
|
"types": "link:./types",
|
|
124
124
|
"ufo": "^0.8.6",
|
|
125
|
-
"ws": "^8.
|
|
125
|
+
"ws": "^8.10.0"
|
|
126
126
|
},
|
|
127
127
|
"peerDependencies": {
|
|
128
128
|
"less": "*",
|