vite 5.3.4 → 5.3.5
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 +44 -0
- package/dist/node/chunks/{dep-CCo80PNg.js → dep-CjZz522d.js} +10 -14
- package/dist/node/chunks/{dep-CrWVpuYf.js → dep-D-7KCb9p.js} +32 -2
- package/dist/node/chunks/{dep-CMeK12d_.js → dep-VqAwxVIc.js} +1 -1
- package/dist/node/chunks/{dep-D8YhmIY-.js → dep-mCdpKltl.js} +2013 -2634
- package/dist/node/cli.js +5 -5
- package/dist/node/index.d.ts +3 -3
- package/dist/node/index.js +2 -2
- package/dist/node-cjs/publicUtils.cjs +10 -17
- package/package.json +6 -6
package/dist/node/cli.js
CHANGED
@@ -2,7 +2,7 @@ import path from 'node:path';
|
|
2
2
|
import fs__default from 'node:fs';
|
3
3
|
import { performance } from 'node:perf_hooks';
|
4
4
|
import { EventEmitter } from 'events';
|
5
|
-
import { A as colors, v as createLogger, r as resolveConfig } from './chunks/dep-
|
5
|
+
import { A as colors, v as createLogger, r as resolveConfig } from './chunks/dep-mCdpKltl.js';
|
6
6
|
import { VERSION } from './constants.js';
|
7
7
|
import 'node:fs/promises';
|
8
8
|
import 'node:url';
|
@@ -730,7 +730,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
|
|
730
730
|
`[boolean] force the optimizer to ignore the cache and re-bundle`
|
731
731
|
).action(async (root, options) => {
|
732
732
|
filterDuplicateOptions(options);
|
733
|
-
const { createServer } = await import('./chunks/dep-
|
733
|
+
const { createServer } = await import('./chunks/dep-mCdpKltl.js').then(function (n) { return n.E; });
|
734
734
|
try {
|
735
735
|
const server = await createServer({
|
736
736
|
root,
|
@@ -822,7 +822,7 @@ cli.command("build [root]", "build for production").option("--target <target>",
|
|
822
822
|
`[boolean] force empty outDir when it's outside of root`
|
823
823
|
).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).action(async (root, options) => {
|
824
824
|
filterDuplicateOptions(options);
|
825
|
-
const { build } = await import('./chunks/dep-
|
825
|
+
const { build } = await import('./chunks/dep-mCdpKltl.js').then(function (n) { return n.F; });
|
826
826
|
const buildOptions = cleanOptions(options);
|
827
827
|
try {
|
828
828
|
await build({
|
@@ -851,7 +851,7 @@ cli.command("optimize [root]", "pre-bundle dependencies").option(
|
|
851
851
|
).action(
|
852
852
|
async (root, options) => {
|
853
853
|
filterDuplicateOptions(options);
|
854
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
854
|
+
const { optimizeDeps } = await import('./chunks/dep-mCdpKltl.js').then(function (n) { return n.D; });
|
855
855
|
try {
|
856
856
|
const config = await resolveConfig(
|
857
857
|
{
|
@@ -877,7 +877,7 @@ ${e.stack}`),
|
|
877
877
|
cli.command("preview [root]", "locally preview production build").option("--host [host]", `[string] specify hostname`, { type: [convertHost] }).option("--port <port>", `[number] specify port`).option("--strictPort", `[boolean] exit if specified port is already in use`).option("--open [path]", `[boolean | string] open browser on startup`).option("--outDir <dir>", `[string] output directory (default: dist)`).action(
|
878
878
|
async (root, options) => {
|
879
879
|
filterDuplicateOptions(options);
|
880
|
-
const { preview } = await import('./chunks/dep-
|
880
|
+
const { preview } = await import('./chunks/dep-mCdpKltl.js').then(function (n) { return n.G; });
|
881
881
|
try {
|
882
882
|
const server = await preview({
|
883
883
|
root,
|
package/dist/node/index.d.ts
CHANGED
@@ -1473,7 +1473,7 @@ interface HmrOptions {
|
|
1473
1473
|
path?: string;
|
1474
1474
|
timeout?: number;
|
1475
1475
|
overlay?: boolean;
|
1476
|
-
server?:
|
1476
|
+
server?: HttpServer;
|
1477
1477
|
}
|
1478
1478
|
interface HmrContext {
|
1479
1479
|
file: string;
|
@@ -1623,7 +1623,7 @@ interface ServerOptions extends CommonServerOptions {
|
|
1623
1623
|
*
|
1624
1624
|
* This is needed to proxy WebSocket connections to the parent server.
|
1625
1625
|
*/
|
1626
|
-
server:
|
1626
|
+
server: HttpServer;
|
1627
1627
|
};
|
1628
1628
|
/**
|
1629
1629
|
* Options for files served via '/\@fs/'.
|
@@ -3575,4 +3575,4 @@ declare class ServerHMRConnector implements HMRRuntimeConnection {
|
|
3575
3575
|
onUpdate(handler: (payload: HMRPayload) => void): void;
|
3576
3576
|
}
|
3577
3577
|
|
3578
|
-
export { type Alias, type AliasOptions, type AnymatchFn, type AnymatchPattern, type AppType, type AwaitWriteFinishOptions, type BindCLIShortcutsOptions, type BuildOptions, type CLIShortcut, type CSSModulesOptions, type CSSOptions, type CommonServerOptions, type ConfigEnv, Connect, type CorsOptions, type CorsOrigin, type DepOptimizationConfig, type DepOptimizationMetadata, type DepOptimizationOptions, type ESBuildOptions, type ESBuildTransformResult, type ExperimentalOptions, type ExportsData, FSWatcher, type FetchModuleOptions, type FileSystemServeOptions, type FilterPattern, type HMRBroadcaster, type HMRBroadcasterClient, type HMRChannel, type HTMLOptions, type HmrContext, type HmrOptions, type HookHandler, type HtmlTagDescriptor, HttpProxy, type IndexHtmlTransform, type IndexHtmlTransformContext, type IndexHtmlTransformHook, type IndexHtmlTransformResult, type InlineConfig, type InternalResolveOptions, type JsonOptions, type LegacyOptions, type LibraryFormats, type LibraryOptions, type LightningCSSOptions, type LogErrorOptions, type LogLevel, type LogOptions, type LogType, type Logger, type LoggerOptions, type MainThreadRuntimeOptions, type Manifest, type ManifestChunk, type MapToFunction, type AnymatchMatcher as Matcher, ModuleGraph, ModuleNode, type ModulePreloadOptions, type OptimizedDepInfo, type Plugin, PluginContainer, type PluginHookUtils, type PluginOption, type PreprocessCSSResult, type PreviewOptions, type PreviewServer, type PreviewServerHook, type ProxyOptions, type RenderBuiltAssetUrl, type ResolveFn, type ResolveModulePreloadDependenciesFn, type ResolveOptions, type ResolvedBuildOptions, type ResolvedCSSOptions, type ResolvedConfig, type ResolvedModulePreloadOptions, type ResolvedPreviewOptions, type ResolvedSSROptions, type ResolvedServerOptions, type ResolvedServerUrls, type ResolvedUrl, type ResolvedWorkerOptions, type ResolverFunction, type ResolverObject, type RollupCommonJSOptions, type RollupDynamicImportVarsOptions, type SSROptions, type SSRTarget, type SendOptions, type ServerHMRChannel, ServerHMRConnector, type ServerHook, type ServerOptions, SplitVendorChunkCache, type SsrDepOptimizationOptions, Terser, type TerserOptions, type TransformOptions, type TransformResult, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, type ViteDevServer, type WatchOptions, WebSocket, WebSocketAlias, type WebSocketClient, type WebSocketCustomListener, WebSocketServer, build, buildErrorMessage, createFilter, createLogger, createServer, createViteRuntime, defineConfig, fetchModule, formatPostcssSourceMap, isCSSRequest, isFileServingAllowed, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, normalizePath, optimizeDeps, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rollupVersion, searchForWorkspaceRoot, send, sortUserPlugins, splitVendorChunk, splitVendorChunkPlugin, transformWithEsbuild, VERSION as version };
|
3578
|
+
export { type Alias, type AliasOptions, type AnymatchFn, type AnymatchPattern, type AppType, type AwaitWriteFinishOptions, type BindCLIShortcutsOptions, type BuildOptions, type CLIShortcut, type CSSModulesOptions, type CSSOptions, type CommonServerOptions, type ConfigEnv, Connect, type CorsOptions, type CorsOrigin, type DepOptimizationConfig, type DepOptimizationMetadata, type DepOptimizationOptions, type ESBuildOptions, type ESBuildTransformResult, type ExperimentalOptions, type ExportsData, FSWatcher, type FetchModuleOptions, type FileSystemServeOptions, type FilterPattern, type HMRBroadcaster, type HMRBroadcasterClient, type HMRChannel, type HTMLOptions, type HmrContext, type HmrOptions, type HookHandler, type HtmlTagDescriptor, HttpProxy, type HttpServer, type IndexHtmlTransform, type IndexHtmlTransformContext, type IndexHtmlTransformHook, type IndexHtmlTransformResult, type InlineConfig, type InternalResolveOptions, type JsonOptions, type LegacyOptions, type LibraryFormats, type LibraryOptions, type LightningCSSOptions, type LogErrorOptions, type LogLevel, type LogOptions, type LogType, type Logger, type LoggerOptions, type MainThreadRuntimeOptions, type Manifest, type ManifestChunk, type MapToFunction, type AnymatchMatcher as Matcher, ModuleGraph, ModuleNode, type ModulePreloadOptions, type OptimizedDepInfo, type Plugin, PluginContainer, type PluginHookUtils, type PluginOption, type PreprocessCSSResult, type PreviewOptions, type PreviewServer, type PreviewServerHook, type ProxyOptions, type RenderBuiltAssetUrl, type ResolveFn, type ResolveModulePreloadDependenciesFn, type ResolveOptions, type ResolvedBuildOptions, type ResolvedCSSOptions, type ResolvedConfig, type ResolvedModulePreloadOptions, type ResolvedPreviewOptions, type ResolvedSSROptions, type ResolvedServerOptions, type ResolvedServerUrls, type ResolvedUrl, type ResolvedWorkerOptions, type ResolverFunction, type ResolverObject, type RollupCommonJSOptions, type RollupDynamicImportVarsOptions, type SSROptions, type SSRTarget, type SendOptions, type ServerHMRChannel, ServerHMRConnector, type ServerHook, type ServerOptions, SplitVendorChunkCache, type SsrDepOptimizationOptions, Terser, type TerserOptions, type TransformOptions, type TransformResult, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, type ViteDevServer, type WatchOptions, WebSocket, WebSocketAlias, type WebSocketClient, type WebSocketCustomListener, WebSocketServer, build, buildErrorMessage, createFilter, createLogger, createServer, createViteRuntime, defineConfig, fetchModule, formatPostcssSourceMap, isCSSRequest, isFileServingAllowed, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, normalizePath, optimizeDeps, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rollupVersion, searchForWorkspaceRoot, send, sortUserPlugins, splitVendorChunk, splitVendorChunkPlugin, transformWithEsbuild, VERSION as version };
|
package/dist/node/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export { parseAst, parseAstAsync } from 'rollup/parseAst';
|
2
|
-
import { i as isInNodeModules, a as arraify } from './chunks/dep-
|
3
|
-
export { b as build, g as buildErrorMessage, k as createFilter, v as createLogger, c as createServer, d as defineConfig, h as fetchModule, f as formatPostcssSourceMap, x as isFileServingAllowed, l as loadConfigFromFile, y as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, z as resolveEnvPrefix, q as rollupVersion, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
2
|
+
import { i as isInNodeModules, a as arraify } from './chunks/dep-mCdpKltl.js';
|
3
|
+
export { b as build, g as buildErrorMessage, k as createFilter, v as createLogger, c as createServer, d as defineConfig, h as fetchModule, f as formatPostcssSourceMap, x as isFileServingAllowed, l as loadConfigFromFile, y as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, z as resolveEnvPrefix, q as rollupVersion, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-mCdpKltl.js';
|
4
4
|
export { VERSION as version } from './constants.js';
|
5
5
|
export { version as esbuildVersion } from 'esbuild';
|
6
6
|
import { existsSync, readFileSync } from 'node:fs';
|
@@ -3454,7 +3454,6 @@ function tryStatSync(file) {
|
|
3454
3454
|
} catch {
|
3455
3455
|
}
|
3456
3456
|
}
|
3457
|
-
const splitRE = /\r?\n/g;
|
3458
3457
|
function isFileReadable(filename) {
|
3459
3458
|
if (!tryStatSync(filename)) {
|
3460
3459
|
return false;
|
@@ -5394,7 +5393,6 @@ function getTimeFormatter() {
|
|
5394
5393
|
});
|
5395
5394
|
return timeFormatter;
|
5396
5395
|
}
|
5397
|
-
const MAX_LOG_CHAR = 5e3;
|
5398
5396
|
function createLogger(level = "info", options = {}) {
|
5399
5397
|
if (options.customLogger) {
|
5400
5398
|
return options.customLogger;
|
@@ -5405,22 +5403,17 @@ function createLogger(level = "info", options = {}) {
|
|
5405
5403
|
const canClearScreen = allowClearScreen && process.stdout.isTTY && !process.env.CI;
|
5406
5404
|
const clear = canClearScreen ? clearScreen : () => {
|
5407
5405
|
};
|
5408
|
-
function
|
5409
|
-
if (msg.length > MAX_LOG_CHAR) {
|
5410
|
-
const shorten = msg.slice(0, MAX_LOG_CHAR);
|
5411
|
-
const lines = msg.slice(MAX_LOG_CHAR).match(splitRE)?.length || 0;
|
5412
|
-
return `${shorten}
|
5413
|
-
... and ${lines} lines more`;
|
5414
|
-
}
|
5415
|
-
return msg;
|
5416
|
-
}
|
5417
|
-
function format(type, rawMsg, options2 = {}) {
|
5418
|
-
const msg = preventOverflow(rawMsg);
|
5406
|
+
function format(type, msg, options2 = {}) {
|
5419
5407
|
if (options2.timestamp) {
|
5420
|
-
|
5421
|
-
|
5422
|
-
|
5423
|
-
|
5408
|
+
let tag = "";
|
5409
|
+
if (type === "info") {
|
5410
|
+
tag = colors.cyan(colors.bold(prefix));
|
5411
|
+
} else if (type === "warn") {
|
5412
|
+
tag = colors.yellow(colors.bold(prefix));
|
5413
|
+
} else {
|
5414
|
+
tag = colors.red(colors.bold(prefix));
|
5415
|
+
}
|
5416
|
+
return `${colors.dim(getTimeFormatter().format(/* @__PURE__ */ new Date()))} ${tag} ${msg}`;
|
5424
5417
|
} else {
|
5425
5418
|
return msg;
|
5426
5419
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vite",
|
3
|
-
"version": "5.3.
|
3
|
+
"version": "5.3.5",
|
4
4
|
"type": "module",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": "Evan You",
|
@@ -81,7 +81,7 @@
|
|
81
81
|
},
|
82
82
|
"devDependencies": {
|
83
83
|
"@ampproject/remapping": "^2.3.0",
|
84
|
-
"@babel/parser": "^7.24.
|
84
|
+
"@babel/parser": "^7.24.8",
|
85
85
|
"@jridgewell/trace-mapping": "^0.3.25",
|
86
86
|
"@polka/compression": "^1.0.0-next.25",
|
87
87
|
"@rollup/plugin-alias": "^5.1.0",
|
@@ -127,8 +127,8 @@
|
|
127
127
|
"resolve.exports": "^2.0.2",
|
128
128
|
"rollup-plugin-dts": "^6.1.1",
|
129
129
|
"rollup-plugin-esbuild": "^6.1.1",
|
130
|
-
"rollup-plugin-license": "^3.5.
|
131
|
-
"sass": "^1.77.
|
130
|
+
"rollup-plugin-license": "^3.5.2",
|
131
|
+
"sass": "^1.77.8",
|
132
132
|
"sirv": "^2.0.4",
|
133
133
|
"source-map-support": "^0.5.21",
|
134
134
|
"strip-ansi": "^7.1.0",
|
@@ -136,8 +136,8 @@
|
|
136
136
|
"tsconfck": "^3.1.1",
|
137
137
|
"tslib": "^2.6.3",
|
138
138
|
"types": "link:./types",
|
139
|
-
"ufo": "^1.5.
|
140
|
-
"ws": "^8.
|
139
|
+
"ufo": "^1.5.4",
|
140
|
+
"ws": "^8.18.0"
|
141
141
|
},
|
142
142
|
"peerDependencies": {
|
143
143
|
"@types/node": "^18.0.0 || >=20.0.0",
|