vite 3.2.0-beta.4 → 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-06c4efef.js → dep-1180cbc3.js} +1 -1
- package/dist/node/chunks/{dep-0e9c6c9f.js → dep-61d2428a.js} +510 -485
- package/dist/node/cli.js +9 -5
- package/dist/node/constants.js +1 -1
- package/dist/node/index.d.ts +19 -0
- 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
|
@@ -59,6 +59,7 @@ import type { ServerOptions as ServerOptions_2 } from 'node:https';
|
|
|
59
59
|
import type { ServerResponse } from 'node:http';
|
|
60
60
|
import type { SourceDescription } from 'rollup';
|
|
61
61
|
import type { SourceMap } from 'rollup';
|
|
62
|
+
import type { SourceMapInput } from 'rollup';
|
|
62
63
|
import type * as stream from 'node:stream';
|
|
63
64
|
import type { TransformPluginContext } from 'rollup';
|
|
64
65
|
import type { TransformResult as TransformResult_2 } from 'rollup';
|
|
@@ -230,6 +231,12 @@ export declare interface BuildOptions {
|
|
|
230
231
|
* @default true when outDir is a sub directory of project root
|
|
231
232
|
*/
|
|
232
233
|
emptyOutDir?: boolean | null;
|
|
234
|
+
/**
|
|
235
|
+
* Copy the public directory to outDir on write.
|
|
236
|
+
* @default true
|
|
237
|
+
* @experimental
|
|
238
|
+
*/
|
|
239
|
+
copyPublicDir?: boolean;
|
|
233
240
|
/**
|
|
234
241
|
* Whether to emit a manifest.json under assets dir to map hash-less filenames
|
|
235
242
|
* to their hashed versions. Useful when you want to generate your own HTML
|
|
@@ -1528,6 +1535,18 @@ export declare interface PluginHookUtils {
|
|
|
1528
1535
|
|
|
1529
1536
|
export declare type PluginOption = Plugin_2 | false | null | undefined | PluginOption[] | Promise<Plugin_2 | false | null | undefined | PluginOption[]>;
|
|
1530
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
|
+
|
|
1531
1550
|
/**
|
|
1532
1551
|
* Starts the Vite server in preview mode, to simulate a production deployment
|
|
1533
1552
|
*/
|
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": "*",
|