vite 6.3.6 → 6.4.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/node/chunks/{dep-D67CHC8_.js → dep-BgXtUGwv.js} +1 -1
- package/dist/node/chunks/{dep-B63J_9ss.js → dep-DpdbJjFS.js} +1 -1
- package/dist/node/chunks/{dep-Bu492Fnd.js → dep-N2lvmi1C.js} +20 -5
- package/dist/node/cli.js +5 -5
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.js +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Q as commonjsGlobal, P as getDefaultExportFromCjs } from './dep-
|
|
1
|
+
import { Q as commonjsGlobal, P as getDefaultExportFromCjs } from './dep-N2lvmi1C.js';
|
|
2
2
|
import require$$0$2 from 'fs';
|
|
3
3
|
import require$$0 from 'postcss';
|
|
4
4
|
import require$$0$1 from 'path';
|
|
@@ -9048,7 +9048,7 @@ class TSConfckCache {
|
|
|
9048
9048
|
}
|
|
9049
9049
|
|
|
9050
9050
|
const debug$i = createDebugger("vite:esbuild");
|
|
9051
|
-
const IIFE_BEGIN_RE = /(?:const|var)\s+\S+\s*=\s
|
|
9051
|
+
const IIFE_BEGIN_RE = /(?:const|var)\s+\S+\s*=\s*\(?function\([^()]*\)\s*\{\s*"use strict";/;
|
|
9052
9052
|
const validExtensionRE = /\.\w+$/;
|
|
9053
9053
|
const jsxExtensionsRE = /\.(?:j|t)sx\b/;
|
|
9054
9054
|
const defaultEsbuildSupported = {
|
|
@@ -38340,11 +38340,21 @@ function rejectInvalidRequestMiddleware() {
|
|
|
38340
38340
|
};
|
|
38341
38341
|
}
|
|
38342
38342
|
|
|
38343
|
+
const usedConfigs = /* @__PURE__ */ new WeakSet();
|
|
38343
38344
|
function createServer(inlineConfig = {}) {
|
|
38344
38345
|
return _createServer(inlineConfig, { listen: true });
|
|
38345
38346
|
}
|
|
38346
38347
|
async function _createServer(inlineConfig = {}, options) {
|
|
38347
|
-
const config = await resolveConfig(inlineConfig, "serve");
|
|
38348
|
+
const config = isResolvedConfig(inlineConfig) ? inlineConfig : await resolveConfig(inlineConfig, "serve");
|
|
38349
|
+
if (usedConfigs.has(config)) {
|
|
38350
|
+
throw new Error(`There is already a server associated with the config.`);
|
|
38351
|
+
}
|
|
38352
|
+
if (config.command !== "serve") {
|
|
38353
|
+
throw new Error(
|
|
38354
|
+
`Config was resolved for a "build", expected a "serve" command.`
|
|
38355
|
+
);
|
|
38356
|
+
}
|
|
38357
|
+
usedConfigs.add(config);
|
|
38348
38358
|
const initPublicFilesPromise = initPublicFiles(config);
|
|
38349
38359
|
const { root, server: serverConfig } = config;
|
|
38350
38360
|
const httpsOptions = await resolveHttpsConfig(config.server.https);
|
|
@@ -43930,8 +43940,8 @@ function createCachedImport(imp) {
|
|
|
43930
43940
|
return cached;
|
|
43931
43941
|
};
|
|
43932
43942
|
}
|
|
43933
|
-
const importPostcssImport = createCachedImport(() => import('./dep-
|
|
43934
|
-
const importPostcssModules = createCachedImport(() => import('./dep-
|
|
43943
|
+
const importPostcssImport = createCachedImport(() => import('./dep-BgXtUGwv.js').then(function (n) { return n.i; }));
|
|
43944
|
+
const importPostcssModules = createCachedImport(() => import('./dep-DpdbJjFS.js').then(function (n) { return n.i; }));
|
|
43935
43945
|
const importPostcss = createCachedImport(() => import('postcss'));
|
|
43936
43946
|
const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
|
|
43937
43947
|
let alwaysFakeWorkerWorkerControllerCache;
|
|
@@ -48427,6 +48437,7 @@ async function runnerImport(moduleId, inlineConfig) {
|
|
|
48427
48437
|
|
|
48428
48438
|
const debug = createDebugger("vite:config", { depth: 10 });
|
|
48429
48439
|
const promisifiedRealpath = promisify$4(fs__default.realpath);
|
|
48440
|
+
const SYMBOL_RESOLVED_CONFIG = Symbol("vite:resolved-config");
|
|
48430
48441
|
function defineConfig(config) {
|
|
48431
48442
|
return config;
|
|
48432
48443
|
}
|
|
@@ -48717,6 +48728,9 @@ function resolveDepOptimizationOptions(optimizeDeps, preserveSymlinks, forceOpti
|
|
|
48717
48728
|
optimizeDeps ?? {}
|
|
48718
48729
|
);
|
|
48719
48730
|
}
|
|
48731
|
+
function isResolvedConfig(inlineConfig) {
|
|
48732
|
+
return SYMBOL_RESOLVED_CONFIG in inlineConfig && inlineConfig[SYMBOL_RESOLVED_CONFIG];
|
|
48733
|
+
}
|
|
48720
48734
|
async function resolveConfig(inlineConfig, command, defaultMode = "development", defaultNodeEnv = "development", isPreview = false, patchConfig = void 0, patchPlugins = void 0) {
|
|
48721
48735
|
let config = inlineConfig;
|
|
48722
48736
|
let configFileDependencies = [];
|
|
@@ -49085,7 +49099,8 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
|
49085
49099
|
}
|
|
49086
49100
|
),
|
|
49087
49101
|
safeModulePaths: /* @__PURE__ */ new Set(),
|
|
49088
|
-
additionalAllowedHosts: getAdditionalAllowedHosts(server, preview)
|
|
49102
|
+
additionalAllowedHosts: getAdditionalAllowedHosts(server, preview),
|
|
49103
|
+
[SYMBOL_RESOLVED_CONFIG]: true
|
|
49089
49104
|
};
|
|
49090
49105
|
resolved = {
|
|
49091
49106
|
...config,
|
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 { O as colors, I as createLogger, r as resolveConfig } from './chunks/dep-
|
|
5
|
+
import { O as colors, I as createLogger, r as resolveConfig } from './chunks/dep-N2lvmi1C.js';
|
|
6
6
|
import { VERSION } from './constants.js';
|
|
7
7
|
import 'node:fs/promises';
|
|
8
8
|
import 'node:url';
|
|
@@ -748,7 +748,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
|
|
|
748
748
|
`[boolean] force the optimizer to ignore the cache and re-bundle`
|
|
749
749
|
).action(async (root, options) => {
|
|
750
750
|
filterDuplicateOptions(options);
|
|
751
|
-
const { createServer } = await import('./chunks/dep-
|
|
751
|
+
const { createServer } = await import('./chunks/dep-N2lvmi1C.js').then(function (n) { return n.S; });
|
|
752
752
|
try {
|
|
753
753
|
const server = await createServer({
|
|
754
754
|
root,
|
|
@@ -843,7 +843,7 @@ cli.command("build [root]", "build for production").option("--target <target>",
|
|
|
843
843
|
).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--app", `[boolean] same as \`builder: {}\``).action(
|
|
844
844
|
async (root, options) => {
|
|
845
845
|
filterDuplicateOptions(options);
|
|
846
|
-
const { createBuilder } = await import('./chunks/dep-
|
|
846
|
+
const { createBuilder } = await import('./chunks/dep-N2lvmi1C.js').then(function (n) { return n.T; });
|
|
847
847
|
const buildOptions = cleanGlobalCLIOptions(
|
|
848
848
|
cleanBuilderCLIOptions(options)
|
|
849
849
|
);
|
|
@@ -882,7 +882,7 @@ cli.command(
|
|
|
882
882
|
).action(
|
|
883
883
|
async (root, options) => {
|
|
884
884
|
filterDuplicateOptions(options);
|
|
885
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
|
885
|
+
const { optimizeDeps } = await import('./chunks/dep-N2lvmi1C.js').then(function (n) { return n.R; });
|
|
886
886
|
try {
|
|
887
887
|
const config = await resolveConfig(
|
|
888
888
|
{
|
|
@@ -909,7 +909,7 @@ ${e.stack}`),
|
|
|
909
909
|
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(
|
|
910
910
|
async (root, options) => {
|
|
911
911
|
filterDuplicateOptions(options);
|
|
912
|
-
const { preview } = await import('./chunks/dep-
|
|
912
|
+
const { preview } = await import('./chunks/dep-N2lvmi1C.js').then(function (n) { return n.U; });
|
|
913
913
|
try {
|
|
914
914
|
const server = await preview({
|
|
915
915
|
root,
|
package/dist/node/index.d.ts
CHANGED
|
@@ -3151,7 +3151,7 @@ interface ResolvedServerUrls {
|
|
|
3151
3151
|
local: string[];
|
|
3152
3152
|
network: string[];
|
|
3153
3153
|
}
|
|
3154
|
-
declare function createServer(inlineConfig?: InlineConfig): Promise<ViteDevServer>;
|
|
3154
|
+
declare function createServer(inlineConfig?: InlineConfig | ResolvedConfig): Promise<ViteDevServer>;
|
|
3155
3155
|
|
|
3156
3156
|
interface HtmlTagDescriptor {
|
|
3157
3157
|
tag: string;
|
package/dist/node/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { parseAst, parseAstAsync } from 'rollup/parseAst';
|
|
2
|
-
import { a as arraify, i as isInNodeModules, D as DevEnvironment } from './chunks/dep-
|
|
3
|
-
export { B as BuildEnvironment, f as build, m as buildErrorMessage, g as createBuilder, F as createFilter, h as createIdResolver, I as createLogger, n as createRunnableDevEnvironment, c as createServer, y as createServerHotChannel, w as createServerModuleRunner, x as createServerModuleRunnerTransport, d as defineConfig, v as fetchModule, j as formatPostcssSourceMap, L as isFileLoadingAllowed, K as isFileServingAllowed, q as isRunnableDevEnvironment, l as loadConfigFromFile, M as loadEnv, E as mergeAlias, C as mergeConfig, z as moduleRunnerTransform, A as normalizePath, o as optimizeDeps, p as perEnvironmentPlugin, b as perEnvironmentState, k as preprocessCSS, e as preview, r as resolveConfig, N as resolveEnvPrefix, G as rollupVersion, u as runnerImport, J as searchForWorkspaceRoot, H as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
|
2
|
+
import { a as arraify, i as isInNodeModules, D as DevEnvironment } from './chunks/dep-N2lvmi1C.js';
|
|
3
|
+
export { B as BuildEnvironment, f as build, m as buildErrorMessage, g as createBuilder, F as createFilter, h as createIdResolver, I as createLogger, n as createRunnableDevEnvironment, c as createServer, y as createServerHotChannel, w as createServerModuleRunner, x as createServerModuleRunnerTransport, d as defineConfig, v as fetchModule, j as formatPostcssSourceMap, L as isFileLoadingAllowed, K as isFileServingAllowed, q as isRunnableDevEnvironment, l as loadConfigFromFile, M as loadEnv, E as mergeAlias, C as mergeConfig, z as moduleRunnerTransform, A as normalizePath, o as optimizeDeps, p as perEnvironmentPlugin, b as perEnvironmentState, k as preprocessCSS, e as preview, r as resolveConfig, N as resolveEnvPrefix, G as rollupVersion, u as runnerImport, J as searchForWorkspaceRoot, H as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-N2lvmi1C.js';
|
|
4
4
|
export { defaultAllowedOrigins, DEFAULT_CLIENT_CONDITIONS as defaultClientConditions, DEFAULT_CLIENT_MAIN_FIELDS as defaultClientMainFields, DEFAULT_SERVER_CONDITIONS as defaultServerConditions, DEFAULT_SERVER_MAIN_FIELDS as defaultServerMainFields, VERSION as version } from './constants.js';
|
|
5
5
|
export { version as esbuildVersion } from 'esbuild';
|
|
6
6
|
import 'node:fs';
|