gitea push
This commit is contained in:
+66
-53
@@ -757,8 +757,6 @@ function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLin
|
||||
if (skipable && skipSourceless(line, index)) return;
|
||||
return insert(line, index, [genColumn]);
|
||||
}
|
||||
assert$2(sourceLine);
|
||||
assert$2(sourceColumn);
|
||||
const sourcesIndex = put(sources, source);
|
||||
const namesIndex = name ? put(names, name) : NO_NAME;
|
||||
if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null;
|
||||
@@ -776,7 +774,6 @@ function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLin
|
||||
sourceColumn
|
||||
]);
|
||||
}
|
||||
function assert$2(_val) {}
|
||||
function getIndex(arr, index) {
|
||||
for (let i = arr.length; i <= index; i++) arr[i] = [];
|
||||
return arr[index];
|
||||
@@ -1088,11 +1085,11 @@ function getDate() {
|
||||
function init$1(debug) {
|
||||
debug.inspectOpts = Object.assign({}, inspectOpts);
|
||||
}
|
||||
var require$1, colors$37, inspectOpts, humanize$1, createDebug, node_default;
|
||||
var require$1, colors$38, inspectOpts, humanize$1, createDebug, node_default;
|
||||
var init_node = __esmMin((() => {
|
||||
init_core();
|
||||
require$1 = createRequire(import.meta.url);
|
||||
colors$37 = process.stderr.getColorDepth && process.stderr.getColorDepth() > 2 ? [
|
||||
colors$38 = process.stderr.getColorDepth && process.stderr.getColorDepth() > 2 ? [
|
||||
20,
|
||||
21,
|
||||
26,
|
||||
@@ -1194,7 +1191,7 @@ var init_node = __esmMin((() => {
|
||||
} catch (_unused) {
|
||||
humanize$1 = humanize;
|
||||
}
|
||||
createDebug = setup(useColors(), colors$37, log, load, save, formatArgs, init$1);
|
||||
createDebug = setup(useColors(), colors$38, log, load, save, formatArgs, init$1);
|
||||
createDebug.inspectOpts = inspectOpts;
|
||||
createDebug.formatters.o = function(v) {
|
||||
this.inspectOpts.colors = this.useColors;
|
||||
@@ -2799,7 +2796,7 @@ function getTSConfigResolutionCache(config) {
|
||||
}
|
||||
return cache;
|
||||
}
|
||||
async function reloadOnTsconfigChange(server, changedFile) {
|
||||
function reloadOnTsconfigChange(server, changedFile) {
|
||||
if (changedFile.endsWith(".json")) {
|
||||
const cache = getTSConfigResolutionCache(server.config);
|
||||
if (changedFile.endsWith("/tsconfig.json")) {
|
||||
@@ -4510,7 +4507,7 @@ function throwFileNotFoundInOptimizedDep(id) {
|
||||
throw err;
|
||||
}
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/ufo@1.6.3/node_modules/ufo/dist/index.mjs
|
||||
//#region ../../node_modules/.pnpm/ufo@1.6.4/node_modules/ufo/dist/index.mjs
|
||||
const HASH_RE = /#/g;
|
||||
const AMPERSAND_RE = /&/g;
|
||||
const SLASH_RE = /\//g;
|
||||
@@ -10854,7 +10851,7 @@ var SSRCompatModuleRunner = class extends ModuleRunner {
|
||||
}
|
||||
};
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/periscopic@4.0.2/node_modules/periscopic/src/index.js
|
||||
//#region ../../node_modules/.pnpm/periscopic@4.0.3/node_modules/periscopic/src/index.js
|
||||
/**
|
||||
* @param {import('estree').Node} param
|
||||
* @returns {string[]}
|
||||
@@ -11092,7 +11089,7 @@ async function ssrTransform(code, inMap, url, originalCode, options) {
|
||||
if (options?.json?.stringify && isJSONRequest(url)) return ssrTransformJSON(code, inMap);
|
||||
return ssrTransformScript(code, inMap, url, originalCode);
|
||||
}
|
||||
async function ssrTransformJSON(code, inMap) {
|
||||
function ssrTransformJSON(code, inMap) {
|
||||
return {
|
||||
code: code.replace("export default", `${ssrModuleExportsKey}.default =`),
|
||||
map: inMap,
|
||||
@@ -19553,7 +19550,7 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
};
|
||||
}));
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.10_tsx@4.21.0_yaml@2.8.2/node_modules/postcss-load-config/src/req.js
|
||||
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.14_tsx@4.21.0_yaml@2.8.2/node_modules/postcss-load-config/src/req.js
|
||||
var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
const { createRequire: createRequire$1 } = __require("node:module");
|
||||
const { fileURLToPath: fileURLToPath$1, pathToFileURL: pathToFileURL$1 } = __require("node:url");
|
||||
@@ -19595,7 +19592,7 @@ var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
module.exports = req;
|
||||
}));
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.10_tsx@4.21.0_yaml@2.8.2/node_modules/postcss-load-config/src/options.js
|
||||
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.14_tsx@4.21.0_yaml@2.8.2/node_modules/postcss-load-config/src/options.js
|
||||
var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
const req = require_req();
|
||||
/**
|
||||
@@ -19629,7 +19626,7 @@ var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
module.exports = options;
|
||||
}));
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.10_tsx@4.21.0_yaml@2.8.2/node_modules/postcss-load-config/src/plugins.js
|
||||
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.14_tsx@4.21.0_yaml@2.8.2/node_modules/postcss-load-config/src/plugins.js
|
||||
var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
const req = require_req();
|
||||
/**
|
||||
@@ -19683,7 +19680,7 @@ var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
module.exports = plugins;
|
||||
}));
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.10_tsx@4.21.0_yaml@2.8.2/node_modules/postcss-load-config/src/index.js
|
||||
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.6.1_postcss@8.5.14_tsx@4.21.0_yaml@2.8.2/node_modules/postcss-load-config/src/index.js
|
||||
var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
const { resolve: resolve$3 } = __require("node:path");
|
||||
const config = require_src$1();
|
||||
@@ -20432,7 +20429,7 @@ function cssPlugin(config) {
|
||||
},
|
||||
load: {
|
||||
filter: { id: CSS_LANGS_RE },
|
||||
async handler(id) {
|
||||
handler(id) {
|
||||
if (urlRE$1.test(id)) {
|
||||
if (isModuleCSSRequest(id)) throw new Error(`?url is not supported with CSS modules. (tried to import ${JSON.stringify(id)})`);
|
||||
if (isBuild) {
|
||||
@@ -20816,7 +20813,7 @@ function cssAnalysisPlugin(config) {
|
||||
include: CSS_LANGS_RE,
|
||||
exclude: [commonjsProxyRE, SPECIAL_QUERY_RE]
|
||||
} },
|
||||
async handler(_, id) {
|
||||
handler(_, id) {
|
||||
const { moduleGraph } = this.environment;
|
||||
const thisModule = moduleGraph.getModuleById(id);
|
||||
if (thisModule) {
|
||||
@@ -21145,7 +21142,7 @@ function combineSourcemapsIfExists(filename, map1, map2) {
|
||||
const viteHashUpdateMarker = "/*$vite$:1*/";
|
||||
const viteHashUpdateMarkerRE = /\/\*\$vite\$:\d+\*\//;
|
||||
async function finalizeCss(css, config) {
|
||||
if (css.includes("@import") || css.includes("@charset")) css = await hoistAtRules(css);
|
||||
if (css.includes("@import") || css.includes("@charset")) css = hoistAtRules(css);
|
||||
if (config.build.cssMinify) css = await minifyCSS(css, config, false);
|
||||
css += viteHashUpdateMarker;
|
||||
return css;
|
||||
@@ -21353,7 +21350,7 @@ function resolveMinifyCssEsbuildOptions(options) {
|
||||
}
|
||||
const atImportRE = /@import(?:\s*(?:url\([^)]*\)|"(?:[^"]|(?<=\\)")*"|'(?:[^']|(?<=\\)')*').*?|[^;]*);/g;
|
||||
const atCharsetRE = /@charset(?:\s*(?:"(?:[^"]|(?<=\\)")*"|'(?:[^']|(?<=\\)')*').*?|[^;]*);/g;
|
||||
async function hoistAtRules(css) {
|
||||
function hoistAtRules(css) {
|
||||
const s = new MagicString(css);
|
||||
const cleanCss = emptyCssComments(css);
|
||||
let match;
|
||||
@@ -22920,18 +22917,18 @@ function definePlugin(config) {
|
||||
};
|
||||
return {
|
||||
name: "vite:define",
|
||||
transform: { async handler(code, id) {
|
||||
transform: { handler(code, id) {
|
||||
if (this.environment.config.consumer === "client") return;
|
||||
if (isHTMLRequest(id) || isCSSRequest(id) || isNonJsRequest(id) || config.assetsInclude(id)) return;
|
||||
const [define, pattern] = getPattern(this.environment);
|
||||
if (!pattern) return;
|
||||
pattern.lastIndex = 0;
|
||||
if (!pattern.test(code)) return;
|
||||
return await replaceDefine(this.environment, code, id, define);
|
||||
return replaceDefine(this.environment, code, id, define);
|
||||
} }
|
||||
};
|
||||
}
|
||||
async function replaceDefine(environment, code, id, define) {
|
||||
function replaceDefine(environment, code, id, define) {
|
||||
const result = transformSync(id, code, {
|
||||
lang: "js",
|
||||
sourceType: "module",
|
||||
@@ -22988,13 +22985,13 @@ function clientInjectionsPlugin(config) {
|
||||
async buildStart() {
|
||||
injectConfigValues = await createClientConfigValueReplacer(config);
|
||||
},
|
||||
async transform(code, id) {
|
||||
transform(code, id) {
|
||||
const ssr = this.environment.config.consumer === "server";
|
||||
const cleanId = cleanUrl(id);
|
||||
if (cleanId === normalizedClientEntry$1 || cleanId === normalizedEnvEntry$1) return getDefineReplacer(this)(injectConfigValues(code));
|
||||
else if (!ssr && code.includes("process.env.NODE_ENV")) {
|
||||
const nodeEnv = this.environment.config.define?.["process.env.NODE_ENV"] || JSON.stringify(process.env.NODE_ENV || config.mode);
|
||||
return await replaceDefine(this.environment, code, id, {
|
||||
return replaceDefine(this.environment, code, id, {
|
||||
"process.env.NODE_ENV": nodeEnv,
|
||||
"global.process.env.NODE_ENV": nodeEnv,
|
||||
"globalThis.process.env.NODE_ENV": nodeEnv
|
||||
@@ -23369,7 +23366,7 @@ function createDepsOptimizer(environment) {
|
||||
path: "*"
|
||||
});
|
||||
}
|
||||
async function rerun() {
|
||||
function rerun() {
|
||||
const depsString = depsLogString(Object.keys(metadata.discovered));
|
||||
debug$9?.(import_picocolors.default.green(`new dependencies found: ${depsString}`));
|
||||
runOptimizer();
|
||||
@@ -24738,7 +24735,7 @@ var DevEnvironment = class extends BaseEnvironment {
|
||||
});
|
||||
}
|
||||
});
|
||||
this.hot.on("vite:invalidate", async ({ path, message, firstInvalidatedBy }, client) => {
|
||||
this.hot.on("vite:invalidate", ({ path, message, firstInvalidatedBy }, client) => {
|
||||
this.invalidateModule({
|
||||
path,
|
||||
message,
|
||||
@@ -24869,7 +24866,7 @@ function setupOnCrawlEnd() {
|
||||
if (timeoutHandle) clearTimeout(timeoutHandle);
|
||||
timeoutHandle = setTimeout(callOnCrawlEndWhenIdle, callCrawlEndIfIdleAfterMs);
|
||||
}
|
||||
async function callOnCrawlEndWhenIdle() {
|
||||
function callOnCrawlEndWhenIdle() {
|
||||
if (cancelled || registeredIds.size > 0) return;
|
||||
onCrawlEndPromiseWithResolvers.resolve();
|
||||
}
|
||||
@@ -27360,7 +27357,7 @@ function webWorkerPlugin(config) {
|
||||
},
|
||||
transform: {
|
||||
filter: { id: workerFileRE },
|
||||
async handler(raw, id) {
|
||||
handler(raw, id) {
|
||||
const workerFileMatch = workerFileRE.exec(id);
|
||||
if (workerFileMatch) {
|
||||
const workerType = workerFileMatch[1];
|
||||
@@ -27995,7 +27992,7 @@ export default ${wasmHelperCode}
|
||||
},
|
||||
renderChunk: env.config.consumer === "server" ? {
|
||||
filter: { code: wasmInitUrlRE },
|
||||
async handler(code, chunk, opts, meta) {
|
||||
handler(code, chunk, opts, meta) {
|
||||
const toRelativeRuntime = createToImportMetaURLBasedRelativeRuntime(opts.format, this.environment.config.isWorker);
|
||||
let match;
|
||||
let s;
|
||||
@@ -28778,15 +28775,22 @@ function importGlobPlugin(config) {
|
||||
async handler(code, id) {
|
||||
const result = await transformGlobImport(code, id, config.root, (im, _, options) => this.resolve(im, id, options).then((i) => i?.id || im), config.experimental.importGlobRestoreExtension, config.logger);
|
||||
if (result) {
|
||||
const allGlobs = result.matches.map((i) => i.globsResolved);
|
||||
if (!importGlobMaps.has(this.environment)) importGlobMaps.set(this.environment, /* @__PURE__ */ new Map());
|
||||
const globMatchers = allGlobs.map((globs) => {
|
||||
const globMatchers = result.matches.map((i) => {
|
||||
const affirmed = [];
|
||||
const negated = [];
|
||||
for (const glob of globs) if (glob[0] === "!") negated.push(glob.slice(1));
|
||||
for (const glob of i.globsResolved) if (glob[0] === "!") negated.push(glob.slice(1));
|
||||
else affirmed.push(glob);
|
||||
const affirmedMatcher = picomatch(affirmed);
|
||||
const negatedMatcher = picomatch(negated);
|
||||
const affirmedMatcher = picomatch(affirmed, {
|
||||
noextglob: true,
|
||||
dot: !!i.options.exhaustive,
|
||||
ignore: i.options.exhaustive ? [] : ["**/node_modules/**"]
|
||||
});
|
||||
const negatedMatcher = picomatch(negated, {
|
||||
noextglob: true,
|
||||
dot: !!i.options.exhaustive,
|
||||
ignore: i.options.exhaustive ? [] : ["**/node_modules/**"]
|
||||
});
|
||||
return (file) => {
|
||||
return (affirmed.length === 0 || affirmedMatcher(file)) && !(negated.length > 0 && negatedMatcher(file));
|
||||
};
|
||||
@@ -29172,7 +29176,7 @@ function createFilterForTransform(idFilter, codeFilter, moduleTypeFilter, cwd) {
|
||||
};
|
||||
}
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.4/node_modules/@vitest/utils/dist/helpers.js
|
||||
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/helpers.js
|
||||
function notNullish(v) {
|
||||
return v != null;
|
||||
}
|
||||
@@ -29180,7 +29184,7 @@ function isPrimitive(value) {
|
||||
return value === null || typeof value !== "function" && typeof value !== "object";
|
||||
}
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.4/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js
|
||||
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js
|
||||
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
||||
function normalizeWindowsPath(input = "") {
|
||||
if (!input) return input;
|
||||
@@ -29259,7 +29263,7 @@ const isAbsolute$2 = function(p) {
|
||||
return _IS_ABSOLUTE_RE.test(p);
|
||||
};
|
||||
//#endregion
|
||||
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.4/node_modules/@vitest/utils/dist/source-map.js
|
||||
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.5/node_modules/@vitest/utils/dist/source-map.js
|
||||
var comma = ",".charCodeAt(0);
|
||||
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
var intToChar = new Uint8Array(64);
|
||||
@@ -29546,7 +29550,7 @@ function parseSingleV8Stack(raw) {
|
||||
function parseStacktrace(stack, options = {}) {
|
||||
const { ignoreStackEntries = stackIgnorePatterns } = options;
|
||||
let stacks = !CHROME_IE_STACK_REGEXP.test(stack) ? parseFFOrSafariStackTrace(stack) : parseV8Stacktrace(stack);
|
||||
const helperIndex = stacks.findLastIndex((s) => s.method === "__VITEST_HELPER__" || s.method === "async*__VITEST_HELPER__" || s.method === "async __VITEST_HELPER__");
|
||||
const helperIndex = stacks.findLastIndex((s) => s.method.includes("__VITEST_HELPER__"));
|
||||
if (helperIndex >= 0) stacks = stacks.slice(helperIndex + 1);
|
||||
return stacks.map((stack) => {
|
||||
if (options.getUrlId) stack.file = options.getUrlId(stack.file);
|
||||
@@ -29732,10 +29736,11 @@ async function resolvePlugins(config, prePlugins, normalPlugins, postPlugins) {
|
||||
const isBuild = config.command === "build";
|
||||
const isBundled = config.isBundled;
|
||||
const isWorker = config.isWorker;
|
||||
const buildPlugins = isBundled ? await (await Promise.resolve().then(() => build_exports)).resolveBuildPlugins(config) : {
|
||||
const buildPlugins = isBundled ? (await Promise.resolve().then(() => build_exports)).resolveBuildPlugins(config) : {
|
||||
pre: [],
|
||||
post: []
|
||||
};
|
||||
const devtoolsIntegrationPlugin = config.devtools.enabled && !isWorker ? await loadDevToolsIntegrationPlugin(config) : null;
|
||||
const { modulePreload } = config.build;
|
||||
return [
|
||||
!isBundled ? optimizedDepsPlugin() : null,
|
||||
@@ -29791,6 +29796,7 @@ async function resolvePlugins(config, prePlugins, normalPlugins, postPlugins) {
|
||||
importGlobPlugin(config),
|
||||
...postPlugins,
|
||||
...buildPlugins.post,
|
||||
devtoolsIntegrationPlugin,
|
||||
...isBundled ? [] : [
|
||||
clientInjectionsPlugin(config),
|
||||
cssAnalysisPlugin(config),
|
||||
@@ -29798,6 +29804,15 @@ async function resolvePlugins(config, prePlugins, normalPlugins, postPlugins) {
|
||||
]
|
||||
].filter(Boolean);
|
||||
}
|
||||
async function loadDevToolsIntegrationPlugin(config) {
|
||||
try {
|
||||
const { DevToolsIntegration } = await import("@vitejs/devtools/integration");
|
||||
return DevToolsIntegration({ config });
|
||||
} catch (error) {
|
||||
config.logger.error(import_picocolors.default.red(`Failed to load Vite DevTools integration: ${error?.message || error?.stack}`), { error });
|
||||
return null;
|
||||
}
|
||||
}
|
||||
function createPluginHookUtils(plugins) {
|
||||
const sortedPluginsCache = /* @__PURE__ */ new Map();
|
||||
function getSortedPlugins(hookName) {
|
||||
@@ -31218,7 +31233,7 @@ function rolldownDepPlugin(environment, qualified, external) {
|
||||
},
|
||||
transform: {
|
||||
filter: { code: assetImportMetaUrlRE },
|
||||
async handler(code, id) {
|
||||
handler(code, id) {
|
||||
let s;
|
||||
const re = new RegExp(assetImportMetaUrlRE);
|
||||
const cleanString = stripLiteral(code);
|
||||
@@ -32650,7 +32665,7 @@ const licenseFiles = [
|
||||
function licensePlugin() {
|
||||
return {
|
||||
name: "vite:license",
|
||||
async generateBundle(_, bundle) {
|
||||
generateBundle(_, bundle) {
|
||||
const licenseOption = this.environment.config.build.license;
|
||||
if (licenseOption === false) return;
|
||||
const packageCache = /* @__PURE__ */ new Map();
|
||||
@@ -32852,7 +32867,7 @@ function resolveBuildEnvironmentOptions(raw, logger, consumer, isBundledDev, isS
|
||||
}
|
||||
};
|
||||
}
|
||||
async function resolveBuildPlugins(config) {
|
||||
function resolveBuildPlugins(config) {
|
||||
const isBuild = config.command === "build";
|
||||
return {
|
||||
pre: [
|
||||
@@ -33442,12 +33457,11 @@ async function createBuilder(inlineConfig = {}, useLegacyBuilder = false) {
|
||||
return output;
|
||||
},
|
||||
async runDevTools() {
|
||||
const devtoolsConfig = config.devtools;
|
||||
if (devtoolsConfig.enabled) try {
|
||||
const { start } = await import(`@vitejs/devtools/cli-commands`);
|
||||
await start(devtoolsConfig.config);
|
||||
if (config.devtools.enabled) try {
|
||||
const { runDevTools } = await import("@vitejs/devtools/integration");
|
||||
await runDevTools(builder);
|
||||
} catch (e) {
|
||||
config.logger.error(import_picocolors.default.red(`Failed to run Vite DevTools: ${e.message || e.stack}`), { error: e });
|
||||
config.logger.error(import_picocolors.default.red(`Failed to run Vite DevTools: ${e?.message || e?.stack}`), { error: e });
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -34096,14 +34110,14 @@ function getDefaultEnvironmentOptions(config) {
|
||||
* Check and warn if `path` includes characters that don't work well in Vite,
|
||||
* such as `#` and `?` and `*`.
|
||||
*/
|
||||
function checkBadCharactersInPath(name, path, logger) {
|
||||
function checkBadCharactersInPath(name, type, path, logger) {
|
||||
const badChars = [];
|
||||
if (path.includes("#")) badChars.push("#");
|
||||
if (path.includes("?")) badChars.push("?");
|
||||
if (path.includes("*")) badChars.push("*");
|
||||
if (badChars.length > 0) {
|
||||
const charString = badChars.map((c) => `"${c}"`).join(" and ");
|
||||
logger.warn(import_picocolors.default.yellow(`${name} contains the ${charString} ${badChars.length > 1 ? "characters" : "character"} (${import_picocolors.default.cyan(path)}), which may not work when running Vite. Consider renaming the directory / file to remove the characters.`));
|
||||
logger.warn(import_picocolors.default.yellow(`${name} contains the ${charString} ${badChars.length > 1 ? "characters" : "character"} (${import_picocolors.default.cyan(path)}), which may not work when running Vite. Consider renaming the ${type} without the characters.`));
|
||||
}
|
||||
}
|
||||
const clientAlias = [{
|
||||
@@ -34262,7 +34276,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
||||
const tsconfigPathsPlugin = userPlugins.find((p) => p.name === "vite-tsconfig-paths" || p.name === "vite-plugin-tsconfig-paths");
|
||||
if (tsconfigPathsPlugin) logger.warnOnce(import_picocolors.default.yellow(`The plugin ${JSON.stringify(tsconfigPathsPlugin.name)} is detected. Vite now supports tsconfig paths resolution natively via the ${import_picocolors.default.bold("resolve.tsconfigPaths")} option. You can remove the plugin and set ${import_picocolors.default.bold("resolve.tsconfigPaths: true")} in your Vite config instead.`));
|
||||
const resolvedRoot = normalizePath(config.root ? path.resolve(config.root) : process.cwd());
|
||||
checkBadCharactersInPath("The project root", resolvedRoot, logger);
|
||||
checkBadCharactersInPath("The project root", "directory", resolvedRoot, logger);
|
||||
const configEnvironmentsClient = config.environments.client;
|
||||
configEnvironmentsClient.dev ??= {};
|
||||
const deprecatedSsrOptimizeDepsConfig = config.ssr?.optimizeDeps ?? {};
|
||||
@@ -34308,7 +34322,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
||||
createEnvironment: void 0
|
||||
}
|
||||
};
|
||||
for (const name of Object.keys(config.environments)) config.environments[name] = mergeConfig(name === "client" ? defaultClientEnvironmentOptions : defaultNonClientEnvironmentOptions, config.environments[name]);
|
||||
for (const name of Object.keys(config.environments)) config.environments[name] = mergeConfig(name === "client" ? defaultClientEnvironmentOptions : deepClone(defaultNonClientEnvironmentOptions), config.environments[name]);
|
||||
await runConfigEnvironmentHook(config.environments, userPlugins, logger, configEnv, config.ssr?.target === "webworker");
|
||||
const isBundledDev = command === "serve" && !!config.experimental?.bundledDev;
|
||||
config.resolve ??= {};
|
||||
@@ -34509,7 +34523,6 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
||||
optimizeDepsDisabledBackwardCompatibility(resolved, resolved.optimizeDeps);
|
||||
optimizeDepsDisabledBackwardCompatibility(resolved, resolved.ssr.optimizeDeps, "ssr.");
|
||||
if (!resolved.builder?.sharedConfigBuild && resolved.environments.ssr) resolved.environments.ssr.build.emitAssets = resolved.build.ssrEmitAssets || resolved.build.emitAssets;
|
||||
if (resolved.devtools.enabled) resolved.build.rolldownOptions.devtools ??= {};
|
||||
applyDepOptimizationOptionCompat(resolved);
|
||||
await setOptimizeDepsPluginNames(resolved);
|
||||
debug?.(`using resolved config: %O`, {
|
||||
@@ -34607,7 +34620,7 @@ async function loadConfigFromFile(configEnv, configFile, configRoot = process.cw
|
||||
};
|
||||
} catch (e) {
|
||||
const logger = createLogger(logLevel, { customLogger });
|
||||
checkBadCharactersInPath("The config path", resolvedPath, logger);
|
||||
checkBadCharactersInPath("The config path", "file", resolvedPath, logger);
|
||||
logger.error(import_picocolors.default.red(`failed to load config from ${resolvedPath}`), { error: e });
|
||||
throw e;
|
||||
}
|
||||
@@ -34660,7 +34673,7 @@ async function bundleConfigFile(fileName, isESM) {
|
||||
name: "externalize-deps",
|
||||
resolveId: {
|
||||
filter: { id: /^[^.#].*/ },
|
||||
async handler(id, importer, { kind }) {
|
||||
handler(id, importer, { kind }) {
|
||||
if (!importer || path.isAbsolute(id) || isNodeBuiltin(id)) return;
|
||||
if (isNodeLikeBuiltin(id) || id.startsWith("npm:")) return {
|
||||
id,
|
||||
|
||||
Reference in New Issue
Block a user