vite 6.1.0-beta.0 → 6.1.0-beta.2
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-7ffYZsA7.js → dep-B-U7Afbv.js} +1 -1
- package/dist/node/chunks/{dep-BADA5W91.js → dep-C64BF_qg.js} +1 -1
- package/dist/node/chunks/{dep-B8FkPgo5.js → dep-De0zV__s.js} +77 -47
- package/dist/node/cli.js +5 -5
- package/dist/node/constants.js +0 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.js +2 -2
- package/dist/node-cjs/publicUtils.cjs +5 -3
- package/package.json +3 -3
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Q as commonjsGlobal, P as getDefaultExportFromCjs } from './dep-
|
1
|
+
import { Q as commonjsGlobal, P as getDefaultExportFromCjs } from './dep-De0zV__s.js';
|
2
2
|
import require$$0$2 from 'fs';
|
3
3
|
import require$$0 from 'postcss';
|
4
4
|
import require$$0$1 from 'path';
|
@@ -16097,7 +16097,8 @@ function resolvePlugin(resolveOptions) {
|
|
16097
16097
|
}
|
16098
16098
|
}
|
16099
16099
|
if (id.startsWith("file://")) {
|
16100
|
-
|
16100
|
+
const { file, postfix } = splitFileAndPostfix(id);
|
16101
|
+
id = fileURLToPath$1(file) + postfix;
|
16101
16102
|
}
|
16102
16103
|
if (isWindows$3 && id[0] === "/") {
|
16103
16104
|
const basedir = importer ? path$d.dirname(importer) : process.cwd();
|
@@ -16152,7 +16153,7 @@ function resolvePlugin(resolveOptions) {
|
|
16152
16153
|
)}"`;
|
16153
16154
|
}
|
16154
16155
|
message += `. Consider adding it to environments.${this.environment.name}.external if it is intended.`;
|
16155
|
-
this.
|
16156
|
+
this.warn(message);
|
16156
16157
|
}
|
16157
16158
|
return options.idOnly ? id : { id, external: true, moduleSideEffects: false };
|
16158
16159
|
} else if (currentEnvironmentOptions.consumer === "client" && isNodeLikeBuiltin(id)) {
|
@@ -17990,7 +17991,6 @@ class ScanEnvironment extends BaseEnvironment {
|
|
17990
17991
|
this,
|
17991
17992
|
this.plugins
|
17992
17993
|
);
|
17993
|
-
await this._pluginContainer.buildStart();
|
17994
17994
|
}
|
17995
17995
|
}
|
17996
17996
|
function devToScanEnvironment(environment) {
|
@@ -20146,7 +20146,7 @@ function expandValue (value, processEnv, runningParsed) {
|
|
20146
20146
|
|
20147
20147
|
function expand$2 (options) {
|
20148
20148
|
// for use with progressive expansion
|
20149
|
-
const runningParsed = {}
|
20149
|
+
// const runningParsed = {}
|
20150
20150
|
|
20151
20151
|
let processEnv = process.env;
|
20152
20152
|
if (options && options.processEnv != null) {
|
@@ -20161,13 +20161,15 @@ function expand$2 (options) {
|
|
20161
20161
|
if (processEnv[key] && processEnv[key] !== value) {
|
20162
20162
|
value = processEnv[key];
|
20163
20163
|
} else {
|
20164
|
-
|
20164
|
+
// PATCH: we pass options.parsed instead of runningParsed
|
20165
|
+
// to allow variables declared in other files to be used
|
20166
|
+
value = expandValue(value, processEnv, options.parsed);
|
20165
20167
|
}
|
20166
20168
|
|
20167
20169
|
options.parsed[key] = _resolveEscapeSequences(value);
|
20168
20170
|
|
20169
20171
|
// for use with progressive expansion
|
20170
|
-
runningParsed[key] = _resolveEscapeSequences(value)
|
20172
|
+
// runningParsed[key] = _resolveEscapeSequences(value)
|
20171
20173
|
}
|
20172
20174
|
|
20173
20175
|
for (const processKey in options.parsed) {
|
@@ -20241,7 +20243,7 @@ function resolveEnvPrefix({
|
|
20241
20243
|
return envPrefix;
|
20242
20244
|
}
|
20243
20245
|
|
20244
|
-
const docsURL = "https://
|
20246
|
+
const docsURL = "https://vite.dev";
|
20245
20247
|
const deprecationCode = {
|
20246
20248
|
removePluginHookSsrArgument: "changes/this-environment-in-hooks",
|
20247
20249
|
removePluginHookHandleHotUpdate: "changes/hotupdate-hook",
|
@@ -30807,9 +30809,9 @@ async function instantiateModule(url, runner, environment, fixStacktrace) {
|
|
30807
30809
|
ssrFixStacktrace(e, environment.moduleGraph);
|
30808
30810
|
}
|
30809
30811
|
environment.logger.error(
|
30810
|
-
|
30811
|
-
|
30812
|
-
|
30812
|
+
buildErrorMessage(e, [
|
30813
|
+
colors$1.red(`Error when evaluating SSR module ${url}: ${e.message}`)
|
30814
|
+
]),
|
30813
30815
|
{
|
30814
30816
|
timestamp: true,
|
30815
30817
|
clear: environment.config.clearScreen,
|
@@ -31588,7 +31590,7 @@ function isRefIdentifier(id, parent, parentStack) {
|
|
31588
31590
|
if (parent.type === "MemberExpression" && parent.property === id && !parent.computed) {
|
31589
31591
|
return false;
|
31590
31592
|
}
|
31591
|
-
if (parent.type === "ExportSpecifier") {
|
31593
|
+
if (parent.type === "ExportSpecifier" || parent.type === "ExportAllDeclaration") {
|
31592
31594
|
return false;
|
31593
31595
|
}
|
31594
31596
|
if (id.name === "arguments") {
|
@@ -37940,7 +37942,9 @@ function createWebSocketServer(server, config, httpsOptions) {
|
|
37940
37942
|
wsHttpServer.on("error", (e) => {
|
37941
37943
|
if (e.code === "EADDRINUSE") {
|
37942
37944
|
config.logger.error(
|
37943
|
-
colors$1.red(
|
37945
|
+
colors$1.red(
|
37946
|
+
`WebSocket server error: Port ${e.port} is already in use`
|
37947
|
+
),
|
37944
37948
|
{ error: e }
|
37945
37949
|
);
|
37946
37950
|
} else {
|
@@ -37984,7 +37988,7 @@ ${err.stack}`, {
|
|
37984
37988
|
wss.on("error", (e) => {
|
37985
37989
|
if (e.code === "EADDRINUSE") {
|
37986
37990
|
config.logger.error(
|
37987
|
-
colors$1.red(`WebSocket server error: Port is already in use`),
|
37991
|
+
colors$1.red(`WebSocket server error: Port ${e.port} is already in use`),
|
37988
37992
|
{ error: e }
|
37989
37993
|
);
|
37990
37994
|
} else {
|
@@ -40400,6 +40404,9 @@ ${err.stack}`,
|
|
40400
40404
|
if (typeof bypassResult === "string") {
|
40401
40405
|
debug$5?.(`bypass: ${req.url} -> ${bypassResult}`);
|
40402
40406
|
req.url = bypassResult;
|
40407
|
+
if (res.writableEnded) {
|
40408
|
+
return;
|
40409
|
+
}
|
40403
40410
|
return next();
|
40404
40411
|
}
|
40405
40412
|
if (bypassResult === false) {
|
@@ -42009,7 +42016,7 @@ ${js}`;
|
|
42009
42016
|
}
|
42010
42017
|
},
|
42011
42018
|
async generateBundle(options, bundle) {
|
42012
|
-
const
|
42019
|
+
const analyzedImportedCssFiles = /* @__PURE__ */ new Map();
|
42013
42020
|
const inlineEntryChunk = /* @__PURE__ */ new Set();
|
42014
42021
|
const getImportedChunks = (chunk, seen = /* @__PURE__ */ new Set()) => {
|
42015
42022
|
const chunks = [];
|
@@ -42050,32 +42057,44 @@ ${js}`;
|
|
42050
42057
|
href: toOutputPath(filename)
|
42051
42058
|
}
|
42052
42059
|
});
|
42053
|
-
const
|
42054
|
-
|
42055
|
-
|
42056
|
-
|
42057
|
-
|
42058
|
-
|
42059
|
-
if (importee?.type === "chunk") {
|
42060
|
-
tags.push(...getCssTagsForChunk(importee, toOutputPath, seen));
|
42061
|
-
}
|
42062
|
-
});
|
42060
|
+
const toStyleSheetLinkTag = (file, toOutputPath) => ({
|
42061
|
+
tag: "link",
|
42062
|
+
attrs: {
|
42063
|
+
rel: "stylesheet",
|
42064
|
+
crossorigin: true,
|
42065
|
+
href: toOutputPath(file)
|
42063
42066
|
}
|
42067
|
+
});
|
42068
|
+
const getCssFilesForChunk = (chunk, seenChunks = /* @__PURE__ */ new Set(), seenCss = /* @__PURE__ */ new Set()) => {
|
42069
|
+
if (seenChunks.has(chunk.fileName)) {
|
42070
|
+
return [];
|
42071
|
+
}
|
42072
|
+
seenChunks.add(chunk.fileName);
|
42073
|
+
if (analyzedImportedCssFiles.has(chunk)) {
|
42074
|
+
const files2 = analyzedImportedCssFiles.get(chunk);
|
42075
|
+
const additionals = files2.filter((file) => !seenCss.has(file));
|
42076
|
+
additionals.forEach((file) => seenCss.add(file));
|
42077
|
+
return additionals;
|
42078
|
+
}
|
42079
|
+
const files = [];
|
42080
|
+
chunk.imports.forEach((file) => {
|
42081
|
+
const importee = bundle[file];
|
42082
|
+
if (importee?.type === "chunk") {
|
42083
|
+
files.push(...getCssFilesForChunk(importee, seenChunks, seenCss));
|
42084
|
+
}
|
42085
|
+
});
|
42086
|
+
analyzedImportedCssFiles.set(chunk, files);
|
42064
42087
|
chunk.viteMetadata.importedCss.forEach((file) => {
|
42065
|
-
if (!
|
42066
|
-
|
42067
|
-
|
42068
|
-
tag: "link",
|
42069
|
-
attrs: {
|
42070
|
-
rel: "stylesheet",
|
42071
|
-
crossorigin: true,
|
42072
|
-
href: toOutputPath(file)
|
42073
|
-
}
|
42074
|
-
});
|
42088
|
+
if (!seenCss.has(file)) {
|
42089
|
+
seenCss.add(file);
|
42090
|
+
files.push(file);
|
42075
42091
|
}
|
42076
42092
|
});
|
42077
|
-
return
|
42093
|
+
return files;
|
42078
42094
|
};
|
42095
|
+
const getCssTagsForChunk = (chunk, toOutputPath) => getCssFilesForChunk(chunk).map(
|
42096
|
+
(file) => toStyleSheetLinkTag(file, toOutputPath)
|
42097
|
+
);
|
42079
42098
|
for (const [normalizedId, html] of processedHtml(this)) {
|
42080
42099
|
const relativeUrlPath = normalizePath$3(
|
42081
42100
|
path$d.relative(config.root, normalizedId)
|
@@ -49043,8 +49062,8 @@ function createCachedImport(imp) {
|
|
49043
49062
|
return cached;
|
49044
49063
|
};
|
49045
49064
|
}
|
49046
|
-
const importPostcssImport = createCachedImport(() => import('./dep-
|
49047
|
-
const importPostcssModules = createCachedImport(() => import('./dep-
|
49065
|
+
const importPostcssImport = createCachedImport(() => import('./dep-C64BF_qg.js').then(function (n) { return n.i; }));
|
49066
|
+
const importPostcssModules = createCachedImport(() => import('./dep-B-U7Afbv.js').then(function (n) { return n.i; }));
|
49048
49067
|
const importPostcss = createCachedImport(() => import('postcss'));
|
49049
49068
|
const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
|
49050
49069
|
let alwaysFakeWorkerWorkerControllerCache;
|
@@ -49785,13 +49804,17 @@ async function rebaseUrls(environment, file, rootFile, alias, variablePrefix, re
|
|
49785
49804
|
};
|
49786
49805
|
}
|
49787
49806
|
const makeLessWorker = (environment, resolvers, alias, maxWorkers) => {
|
49788
|
-
const viteLessResolve = async (filename, dir, rootFile) => {
|
49807
|
+
const viteLessResolve = async (filename, dir, rootFile, mime) => {
|
49789
49808
|
const resolved = await resolvers.less(
|
49790
49809
|
environment,
|
49791
49810
|
filename,
|
49792
49811
|
path$d.join(dir, "*")
|
49793
49812
|
);
|
49794
49813
|
if (!resolved) return undefined;
|
49814
|
+
if (mime === "application/javascript") {
|
49815
|
+
const file = path$d.resolve(resolved);
|
49816
|
+
return { resolved: file };
|
49817
|
+
}
|
49795
49818
|
const result = await rebaseUrls(
|
49796
49819
|
environment,
|
49797
49820
|
resolved,
|
@@ -49825,7 +49848,12 @@ const makeLessWorker = (environment, resolvers, alias, maxWorkers) => {
|
|
49825
49848
|
return false;
|
49826
49849
|
}
|
49827
49850
|
async loadFile(filename, dir, opts, env) {
|
49828
|
-
const result = await viteLessResolve(
|
49851
|
+
const result = await viteLessResolve(
|
49852
|
+
filename,
|
49853
|
+
dir,
|
49854
|
+
this.rootFile,
|
49855
|
+
opts.mime
|
49856
|
+
);
|
49829
49857
|
if (result) {
|
49830
49858
|
return {
|
49831
49859
|
filename: path2.resolve(result.resolved),
|
@@ -50305,7 +50333,7 @@ function resolveLibCssFilename(libOptions, root, packageCache) {
|
|
50305
50333
|
} else if (typeof libOptions.fileName === "string") {
|
50306
50334
|
return `${libOptions.fileName}.css`;
|
50307
50335
|
}
|
50308
|
-
const packageJson =
|
50336
|
+
const packageJson = findNearestMainPackageData(root, packageCache)?.data;
|
50309
50337
|
const name = packageJson ? getPkgName(packageJson.name) : undefined;
|
50310
50338
|
if (!name)
|
50311
50339
|
throw new Error(
|
@@ -51331,7 +51359,7 @@ function resolveLibFilename(libOptions, format, entryName, root, extension, pack
|
|
51331
51359
|
if (typeof libOptions.fileName === "function") {
|
51332
51360
|
return libOptions.fileName(format, entryName);
|
51333
51361
|
}
|
51334
|
-
const packageJson =
|
51362
|
+
const packageJson = findNearestMainPackageData(root, packageCache)?.data;
|
51335
51363
|
const name = libOptions.fileName || (packageJson && typeof libOptions.entry === "string" ? getPkgName(packageJson.name) : entryName);
|
51336
51364
|
if (!name)
|
51337
51365
|
throw new Error(
|
@@ -53570,12 +53598,12 @@ const configDefaults = Object.freeze({
|
|
53570
53598
|
environments: {},
|
53571
53599
|
appType: "spa"
|
53572
53600
|
});
|
53573
|
-
function resolveDevEnvironmentOptions(dev, environmentName, consumer, skipSsrTransform) {
|
53601
|
+
function resolveDevEnvironmentOptions(dev, environmentName, consumer, skipSsrTransform, preTransformRequest) {
|
53574
53602
|
const resolved = mergeWithDefaults(
|
53575
53603
|
{
|
53576
53604
|
...configDefaults.dev,
|
53577
53605
|
sourcemapIgnoreList: isInNodeModules$1,
|
53578
|
-
preTransformRequests: consumer === "client",
|
53606
|
+
preTransformRequests: preTransformRequest ?? consumer === "client",
|
53579
53607
|
createEnvironment: environmentName === "client" ? defaultCreateClientDevEnvironment : defaultCreateDevEnvironment,
|
53580
53608
|
recoverable: consumer === "client",
|
53581
53609
|
moduleRunnerTransform: skipSsrTransform !== undefined && consumer === "server" ? skipSsrTransform : consumer === "server"
|
@@ -53587,7 +53615,7 @@ function resolveDevEnvironmentOptions(dev, environmentName, consumer, skipSsrTra
|
|
53587
53615
|
sourcemapIgnoreList: resolved.sourcemapIgnoreList === false ? () => false : resolved.sourcemapIgnoreList
|
53588
53616
|
};
|
53589
53617
|
}
|
53590
|
-
function resolveEnvironmentOptions(options, alias, preserveSymlinks, forceOptimizeDeps, logger, environmentName, skipSsrTransform, isSsrTargetWebworkerSet) {
|
53618
|
+
function resolveEnvironmentOptions(options, alias, preserveSymlinks, forceOptimizeDeps, logger, environmentName, skipSsrTransform, isSsrTargetWebworkerSet, preTransformRequests) {
|
53591
53619
|
const isClientEnvironment = environmentName === "client";
|
53592
53620
|
const consumer = options.consumer ?? (isClientEnvironment ? "client" : "server");
|
53593
53621
|
const isSsrTargetWebworkerEnvironment = isSsrTargetWebworkerSet && environmentName === "ssr";
|
@@ -53614,7 +53642,8 @@ function resolveEnvironmentOptions(options, alias, preserveSymlinks, forceOptimi
|
|
53614
53642
|
options.dev,
|
53615
53643
|
environmentName,
|
53616
53644
|
consumer,
|
53617
|
-
skipSsrTransform
|
53645
|
+
skipSsrTransform,
|
53646
|
+
preTransformRequests
|
53618
53647
|
),
|
53619
53648
|
build: resolveBuildEnvironmentOptions(
|
53620
53649
|
options.build ?? {},
|
@@ -53672,7 +53701,7 @@ function resolveEnvironmentResolveOptions(resolve, alias, preserveSymlinks, logg
|
|
53672
53701
|
...configDefaults.resolve,
|
53673
53702
|
mainFields: consumer === undefined || consumer === "client" || isSsrTargetWebworkerEnvironment ? DEFAULT_CLIENT_MAIN_FIELDS : DEFAULT_SERVER_MAIN_FIELDS,
|
53674
53703
|
conditions: consumer === undefined || consumer === "client" || isSsrTargetWebworkerEnvironment ? DEFAULT_CLIENT_CONDITIONS : DEFAULT_SERVER_CONDITIONS.filter((c) => c !== "browser"),
|
53675
|
-
builtins: resolve?.builtins ?? (consumer === "server"
|
53704
|
+
builtins: resolve?.builtins ?? (consumer === "server" ? isSsrTargetWebworkerEnvironment && resolve?.noExternal === true ? [] : nodeLikeBuiltins : [])
|
53676
53705
|
},
|
53677
53706
|
resolve ?? {}
|
53678
53707
|
);
|
@@ -53875,7 +53904,8 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
53875
53904
|
logger,
|
53876
53905
|
environmentName,
|
53877
53906
|
config.experimental?.skipSsrTransform,
|
53878
|
-
config.ssr?.target === "webworker"
|
53907
|
+
config.ssr?.target === "webworker",
|
53908
|
+
config.server?.preTransformRequests
|
53879
53909
|
);
|
53880
53910
|
}
|
53881
53911
|
const backwardCompatibleOptimizeDeps = resolvedEnvironments.client.optimizeDeps;
|
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-De0zV__s.js';
|
6
6
|
import { VERSION } from './constants.js';
|
7
7
|
import 'node:fs/promises';
|
8
8
|
import 'node:url';
|
@@ -745,7 +745,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
|
|
745
745
|
`[boolean] force the optimizer to ignore the cache and re-bundle`
|
746
746
|
).action(async (root, options) => {
|
747
747
|
filterDuplicateOptions(options);
|
748
|
-
const { createServer } = await import('./chunks/dep-
|
748
|
+
const { createServer } = await import('./chunks/dep-De0zV__s.js').then(function (n) { return n.S; });
|
749
749
|
try {
|
750
750
|
const server = await createServer({
|
751
751
|
root,
|
@@ -839,7 +839,7 @@ cli.command("build [root]", "build for production").option("--target <target>",
|
|
839
839
|
).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--app", `[boolean] same as \`builder: {}\``).action(
|
840
840
|
async (root, options) => {
|
841
841
|
filterDuplicateOptions(options);
|
842
|
-
const { createBuilder } = await import('./chunks/dep-
|
842
|
+
const { createBuilder } = await import('./chunks/dep-De0zV__s.js').then(function (n) { return n.T; });
|
843
843
|
const buildOptions = cleanGlobalCLIOptions(
|
844
844
|
cleanBuilderCLIOptions(options)
|
845
845
|
);
|
@@ -875,7 +875,7 @@ cli.command("optimize [root]", "pre-bundle dependencies").option(
|
|
875
875
|
).action(
|
876
876
|
async (root, options) => {
|
877
877
|
filterDuplicateOptions(options);
|
878
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
878
|
+
const { optimizeDeps } = await import('./chunks/dep-De0zV__s.js').then(function (n) { return n.R; });
|
879
879
|
try {
|
880
880
|
const config = await resolveConfig(
|
881
881
|
{
|
@@ -902,7 +902,7 @@ ${e.stack}`),
|
|
902
902
|
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(
|
903
903
|
async (root, options) => {
|
904
904
|
filterDuplicateOptions(options);
|
905
|
-
const { preview } = await import('./chunks/dep-
|
905
|
+
const { preview } = await import('./chunks/dep-De0zV__s.js').then(function (n) { return n.U; });
|
906
906
|
try {
|
907
907
|
const server = await preview({
|
908
908
|
root,
|
package/dist/node/constants.js
CHANGED
package/dist/node/index.d.ts
CHANGED
@@ -2618,7 +2618,7 @@ interface BuildEnvironmentOptions {
|
|
2618
2618
|
*/
|
2619
2619
|
copyPublicDir?: boolean;
|
2620
2620
|
/**
|
2621
|
-
* Whether to emit a .vite/manifest.json
|
2621
|
+
* Whether to emit a .vite/manifest.json in the output dir to map hash-less filenames
|
2622
2622
|
* to their hashed versions. Useful when you want to generate your own HTML
|
2623
2623
|
* instead of using the one generated by Vite.
|
2624
2624
|
*
|
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 BuildEnvironment, D as DevEnvironment, 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 { i as isInNodeModules, a as arraify } from './chunks/dep-De0zV__s.js';
|
3
|
+
export { B as BuildEnvironment, D as DevEnvironment, 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-De0zV__s.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';
|
@@ -6311,7 +6311,7 @@ function expandValue (value, processEnv, runningParsed) {
|
|
6311
6311
|
|
6312
6312
|
function expand (options) {
|
6313
6313
|
// for use with progressive expansion
|
6314
|
-
const runningParsed = {}
|
6314
|
+
// const runningParsed = {}
|
6315
6315
|
|
6316
6316
|
let processEnv = process.env;
|
6317
6317
|
if (options && options.processEnv != null) {
|
@@ -6326,13 +6326,15 @@ function expand (options) {
|
|
6326
6326
|
if (processEnv[key] && processEnv[key] !== value) {
|
6327
6327
|
value = processEnv[key];
|
6328
6328
|
} else {
|
6329
|
-
|
6329
|
+
// PATCH: we pass options.parsed instead of runningParsed
|
6330
|
+
// to allow variables declared in other files to be used
|
6331
|
+
value = expandValue(value, processEnv, options.parsed);
|
6330
6332
|
}
|
6331
6333
|
|
6332
6334
|
options.parsed[key] = _resolveEscapeSequences(value);
|
6333
6335
|
|
6334
6336
|
// for use with progressive expansion
|
6335
|
-
runningParsed[key] = _resolveEscapeSequences(value)
|
6337
|
+
// runningParsed[key] = _resolveEscapeSequences(value)
|
6336
6338
|
}
|
6337
6339
|
|
6338
6340
|
for (const processKey in options.parsed) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vite",
|
3
|
-
"version": "6.1.0-beta.
|
3
|
+
"version": "6.1.0-beta.2",
|
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.26.
|
84
|
+
"@babel/parser": "^7.26.7",
|
85
85
|
"@jridgewell/trace-mapping": "^0.3.25",
|
86
86
|
"@polka/compression": "^1.0.0-next.25",
|
87
87
|
"@rollup/plugin-alias": "^5.1.1",
|
@@ -116,7 +116,7 @@
|
|
116
116
|
"nanoid": "^5.0.9",
|
117
117
|
"open": "^10.1.0",
|
118
118
|
"parse5": "^7.2.1",
|
119
|
-
"pathe": "^2.0.
|
119
|
+
"pathe": "^2.0.2",
|
120
120
|
"periscopic": "^4.0.2",
|
121
121
|
"picocolors": "^1.1.1",
|
122
122
|
"picomatch": "^4.0.2",
|