@clarify-labs/cli 0.8.0 → 0.8.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.
@@ -36,14 +36,14 @@ shiki = __toESM(shiki, 1);
36
36
  let unist_util_visit = require("unist-util-visit");
37
37
  let _clarify_labs_renderer = require("@clarify-labs/renderer");
38
38
  let yaml = require("yaml");
39
- let remark = require("remark");
40
39
  let gray_matter = require("gray-matter");
41
40
  gray_matter = __toESM(gray_matter, 1);
41
+ let remark = require("remark");
42
+ let node_url = require("node:url");
42
43
  let _apidevtools_swagger_parser = require("@apidevtools/swagger-parser");
43
44
  _apidevtools_swagger_parser = __toESM(_apidevtools_swagger_parser, 1);
44
45
  let node_os = require("node:os");
45
46
  let zod = require("zod");
46
- let node_url = require("node:url");
47
47
  let vite = require("vite");
48
48
  let node_module = require("node:module");
49
49
  //#region source/core/utils.ts
@@ -169,23 +169,76 @@ function readRouteArtifactContent(route) {
169
169
  const content = readRouteContent(route);
170
170
  return shouldUseUtf8Signature(route) ? withUtf8Signature(content) : content;
171
171
  }
172
+ function isLlmsTxtRoute(route) {
173
+ return !route.path.split("/").includes("404");
174
+ }
175
+ function llmsTxtDescription(route) {
176
+ if (route.description) return route.description;
177
+ const sections = route.sections?.filter((section) => section.level === 2).slice(0, 3).map((section) => section.title);
178
+ if (sections?.length) return `Covers ${sections.join(", ")}.`;
179
+ if (route.keywords?.length) return `Related topics: ${route.keywords.join(", ")}.`;
180
+ if (route.kind === "openapi") return "OpenAPI artifact for machine-readable API reference data.";
181
+ }
182
+ function llmsTxtListItem(route, basePath) {
183
+ if (!route.contentArtifactUrl) return void 0;
184
+ const description = llmsTxtDescription(route);
185
+ return description ? `- [${route.title}](${basePath}${route.contentArtifactUrl}): ${description}` : `- [${route.title}](${basePath}${route.contentArtifactUrl})`;
186
+ }
187
+ function llmsTxtLocaleLabel(locale, projectConfig) {
188
+ return projectConfig.i18n?.locales.find((item) => item.code === locale)?.label ?? locale;
189
+ }
190
+ function groupRoutesByLocale(routes) {
191
+ const groups = /* @__PURE__ */ new Map();
192
+ for (const route of routes) {
193
+ const key = route.locale ?? "default";
194
+ groups.set(key, [...groups.get(key) ?? [], route]);
195
+ }
196
+ return groups;
197
+ }
198
+ function groupLlmsTxtRoutesByLocale(routes, projectConfig) {
199
+ const routesBySource = /* @__PURE__ */ new Map();
200
+ const defaultLocale = projectConfig.i18n?.defaultLocale;
201
+ for (const route of routes) {
202
+ const sourceKey = `${route.locale ?? defaultLocale ?? "default"}:${route.basePath ?? route.contentArtifactUrl ?? route.path}`;
203
+ const previousRoute = routesBySource.get(sourceKey);
204
+ if (!previousRoute || previousRoute.locale && !route.locale) routesBySource.set(sourceKey, route);
205
+ }
206
+ return groupRoutesByLocale([...routesBySource.values()].map((route) => ({
207
+ ...route,
208
+ locale: route.locale ?? defaultLocale
209
+ })));
210
+ }
211
+ function llmsTxtDocsSectionTitle(locale, groupCount, projectConfig) {
212
+ if (groupCount <= 1) return "Docs";
213
+ return `Docs - ${locale === "default" ? "Default" : llmsTxtLocaleLabel(locale, projectConfig)}`;
214
+ }
172
215
  function createLlmsTxt(routes, projectConfig) {
173
216
  const basePath = normalizeBasePath(projectConfig.routePrefix);
174
217
  const lines = [`# ${projectConfig.title}`, ""];
175
218
  if (projectConfig.description) lines.push(`> ${projectConfig.description}`, "");
176
- lines.push("## Docs");
177
- for (const route of routes.filter((route) => route.kind === "mdx")) {
178
- if (!route.contentArtifactUrl) continue;
179
- lines.push(`- [${route.title}](${basePath}${route.contentArtifactUrl})`);
219
+ lines.push("This file lists the source-ready Markdown and OpenAPI artifacts for this documentation site.", "");
220
+ const mdxRoutes = routes.filter((route) => route.kind === "mdx" && isLlmsTxtRoute(route));
221
+ if (mdxRoutes.length > 0) {
222
+ const localizedGroups = groupLlmsTxtRoutesByLocale(mdxRoutes, projectConfig);
223
+ for (const [locale, localeRoutes] of localizedGroups) {
224
+ lines.push(`## ${llmsTxtDocsSectionTitle(locale, localizedGroups.size, projectConfig)}`);
225
+ for (const route of localeRoutes) {
226
+ const item = llmsTxtListItem(route, basePath);
227
+ if (item) lines.push(item);
228
+ }
229
+ lines.push("");
230
+ }
180
231
  }
181
- const openApiRoutes = routes.filter((route) => route.kind === "openapi");
232
+ const openApiRoutes = routes.filter((route) => route.kind === "openapi" && isLlmsTxtRoute(route));
182
233
  if (openApiRoutes.length > 0) {
183
- lines.push("", "## OpenAPI");
234
+ if (lines.at(-1) !== "") lines.push("");
235
+ lines.push("## OpenAPI");
184
236
  for (const route of openApiRoutes) {
185
- if (!route.contentArtifactUrl) continue;
186
- lines.push(`- [${route.title}](${basePath}${route.contentArtifactUrl})`);
237
+ const item = llmsTxtListItem(route, basePath);
238
+ if (item) lines.push(item);
187
239
  }
188
240
  }
241
+ while (lines.at(-1) === "") lines.pop();
189
242
  return `${lines.join("\n")}\n`;
190
243
  }
191
244
  function createLlmsTxtArtifact(routes, projectConfig) {
@@ -345,6 +398,101 @@ function parseFrontmatter(content) {
345
398
  };
346
399
  }
347
400
  //#endregion
401
+ //#region source/parsers/content.ts
402
+ async function transformContent(transform, input) {
403
+ return transform ? await transform(input) : input;
404
+ }
405
+ function createContentProcessor(transform) {
406
+ return {
407
+ async processMdx(source, filePath) {
408
+ const { frontmatter, content } = parseFrontmatter(source);
409
+ const transformed = await transformContent(transform, {
410
+ kind: "mdx",
411
+ source,
412
+ filePath,
413
+ frontmatter,
414
+ content
415
+ });
416
+ return {
417
+ frontmatter: transformed.frontmatter,
418
+ content: transformed.content
419
+ };
420
+ },
421
+ async processText(source, kind, filePath) {
422
+ return (await transformContent(transform, {
423
+ kind,
424
+ source,
425
+ filePath,
426
+ frontmatter: {},
427
+ content: source
428
+ })).content;
429
+ }
430
+ };
431
+ }
432
+ //#endregion
433
+ //#region source/core/hooks.ts
434
+ async function runHooks(plugins, hookName, input, ctx) {
435
+ let result = input;
436
+ for (const plugin of plugins) {
437
+ const hook = plugin.hooks?.[hookName];
438
+ if (!hook) continue;
439
+ try {
440
+ result = await hook(result, ctx);
441
+ } catch (err) {
442
+ throw new Error(`[clarify] plugin "${plugin.name}" hook "${hookName}" failed: ${err}`, { cause: err });
443
+ }
444
+ }
445
+ return result;
446
+ }
447
+ async function runDevConfigureServerHooks(plugins, server, ctx) {
448
+ for (const plugin of plugins) {
449
+ const hook = plugin.hooks?.["dev:configureServer"];
450
+ if (!hook) continue;
451
+ try {
452
+ await hook(server, ctx);
453
+ } catch (err) {
454
+ throw new Error(`[clarify] plugin "${plugin.name}" hook "dev:configureServer" failed: ${err}`, { cause: err });
455
+ }
456
+ }
457
+ }
458
+ async function runBuildAssetsHooks(plugins, ctx) {
459
+ const assets = [];
460
+ for (const plugin of plugins) {
461
+ const hook = plugin.hooks?.["build:assets"];
462
+ if (!hook) continue;
463
+ try {
464
+ const pluginAssets = await hook(ctx);
465
+ assets.push(...pluginAssets);
466
+ } catch (err) {
467
+ throw new Error(`[clarify] plugin "${plugin.name}" hook "build:assets" failed: ${err}`, { cause: err });
468
+ }
469
+ }
470
+ return assets;
471
+ }
472
+ async function runBuildDoneHooks(plugins, ctx) {
473
+ for (const plugin of plugins) {
474
+ const hook = plugin.hooks?.["build:done"];
475
+ if (!hook) continue;
476
+ try {
477
+ await hook(ctx);
478
+ } catch (err) {
479
+ throw new Error(`[clarify] plugin "${plugin.name}" hook "build:done" failed: ${err}`, { cause: err });
480
+ }
481
+ }
482
+ }
483
+ //#endregion
484
+ //#region source/core/content.ts
485
+ var contentProcessors = /* @__PURE__ */ new WeakMap();
486
+ function createProjectContentProcessor(plugins, ctx) {
487
+ return createContentProcessor((input) => runHooks(plugins, "content:transform", input, ctx));
488
+ }
489
+ function setProjectContentProcessor(ctx, processor) {
490
+ contentProcessors.set(ctx, processor);
491
+ }
492
+ function getProjectContentProcessor(ctx) {
493
+ return contentProcessors.get(ctx);
494
+ }
495
+ //#endregion
348
496
  //#region source/parsers/routes.ts
349
497
  function kebabToTitle(str) {
350
498
  return str.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
@@ -421,18 +569,19 @@ function resolveLocalizedText(text, locale, fallbackLocale) {
421
569
  if (text === void 0) return void 0;
422
570
  return text[locale] ?? (fallbackLocale ? text[fallbackLocale] : void 0) ?? Object.values(text)[0];
423
571
  }
424
- function findContentRoutes(dir, base = dir) {
572
+ async function findContentRoutes(dir, base = dir, options = {}) {
425
573
  const routes = [];
426
574
  if (!(0, node_fs.existsSync)(dir)) return routes;
427
575
  const entries = (0, node_fs.readdirSync)(dir, { withFileTypes: true });
428
576
  for (const entry of entries) {
429
577
  const fullPath = (0, node_path.join)(dir, entry.name);
430
- if (entry.isDirectory()) routes.push(...findContentRoutes(fullPath, base));
578
+ if (entry.isDirectory()) routes.push(...await findContentRoutes(fullPath, base, options));
431
579
  else if (entry.isFile() && /\.mdx?$/.test(entry.name)) {
432
580
  const relativePath = (0, node_path.relative)(base, fullPath);
433
581
  const pathParts = relativePath.replace(/\.mdx?$/, "").split("/");
434
582
  const cleanPath = ("/" + pathParts.map((p) => p === "index" ? "" : p).filter(Boolean).join("/")).replace(/\/+/g, "/").replace(/\/$/, "") || "/";
435
- const { frontmatter, content } = parseFrontmatter((0, node_fs.readFileSync)(fullPath, "utf-8"));
583
+ const source = (0, node_fs.readFileSync)(fullPath, "utf-8");
584
+ const { frontmatter, content } = await (options.contentProcessor ?? createContentProcessor()).processMdx(source, fullPath);
436
585
  let title = typeof frontmatter.title === "string" ? frontmatter.title : "";
437
586
  if (!title) {
438
587
  const lastPart = pathParts[pathParts.length - 1] ?? "";
@@ -689,6 +838,13 @@ var OPENAPI_HTTP_METHODS = [
689
838
  function errorMessage(error) {
690
839
  return error instanceof Error ? error.message : String(error);
691
840
  }
841
+ function isSameOpenAPIFile(url, filePath) {
842
+ try {
843
+ return (0, node_path.resolve)((0, node_url.fileURLToPath)(url)) === (0, node_path.resolve)(filePath);
844
+ } catch {
845
+ return (0, node_path.resolve)(url) === (0, node_path.resolve)(filePath);
846
+ }
847
+ }
692
848
  function findOpenAPIRoutes(dir, base = dir) {
693
849
  const routes = [];
694
850
  if (!(0, node_fs.existsSync)(dir)) return routes;
@@ -752,12 +908,26 @@ function extractOpenAPISections(spec, filterTags) {
752
908
  }
753
909
  return sections;
754
910
  }
755
- async function readOpenAPISpec(filePath) {
911
+ async function readOpenAPISpec(filePath, contentProcessor) {
756
912
  try {
757
- return {
913
+ if (!contentProcessor) return {
758
914
  ok: true,
759
915
  spec: await _apidevtools_swagger_parser.default.dereference(filePath)
760
916
  };
917
+ const source = (0, node_fs.readFileSync)(filePath, "utf-8");
918
+ const transformedSource = await contentProcessor.processText(source, "openapi", filePath);
919
+ if (transformedSource === source) return {
920
+ ok: true,
921
+ spec: await _apidevtools_swagger_parser.default.dereference(filePath)
922
+ };
923
+ return {
924
+ ok: true,
925
+ spec: await _apidevtools_swagger_parser.default.dereference(filePath, { resolve: { transformedOpenAPISource: {
926
+ order: 1,
927
+ canRead: (file) => isSameOpenAPIFile(file.url, filePath),
928
+ read: () => transformedSource
929
+ } } })
930
+ };
761
931
  } catch (error) {
762
932
  return {
763
933
  ok: false,
@@ -1018,7 +1188,7 @@ function createOpenAPIPlugin() {
1018
1188
  const result = specFromCache ? {
1019
1189
  ok: true,
1020
1190
  spec: specFromCache
1021
- } : await readOpenAPISpec(route.filePath);
1191
+ } : await readOpenAPISpec(route.filePath, getProjectContentProcessor(ctx));
1022
1192
  if (!result.ok) {
1023
1193
  route.diagnostic = result.diagnostic;
1024
1194
  route.title = route.title || "OpenAPI parse error";
@@ -1335,9 +1505,51 @@ function createSourceLinksPlugin() {
1335
1505
  };
1336
1506
  }
1337
1507
  //#endregion
1508
+ //#region source/parsers/variables.ts
1509
+ var variablePattern = /{{\s*([A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)*)\s*}}/g;
1510
+ function getVariableValue(variables, path) {
1511
+ let current = variables;
1512
+ for (const segment of path.split(".")) {
1513
+ if (!current || typeof current !== "object" || Array.isArray(current)) return void 0;
1514
+ current = current[segment];
1515
+ }
1516
+ return current;
1517
+ }
1518
+ function stringifyVariableValue(variables, path, stack) {
1519
+ if (stack.includes(path)) throw new Error(`[clarify] variable "${path}" contains a circular reference: ${[...stack, path].join(" -> ")}`);
1520
+ const value = getVariableValue(variables, path);
1521
+ if (value === void 0 || typeof value === "object") return void 0;
1522
+ if (typeof value !== "string") return String(value);
1523
+ return value.replace(variablePattern, (match, nestedPath) => stringifyVariableValue(variables, nestedPath, [...stack, path]) ?? match);
1524
+ }
1525
+ function applyVariables(content, variables = {}) {
1526
+ return content.replace(variablePattern, (match, path) => stringifyVariableValue(variables, path, []) ?? match);
1527
+ }
1528
+ //#endregion
1529
+ //#region source/plugins/variables/index.ts
1530
+ function applyVariablesToFrontmatter(frontmatter, variables) {
1531
+ const nextFrontmatter = { ...frontmatter };
1532
+ for (const key of ["title", "description"]) {
1533
+ if (typeof nextFrontmatter[key] !== "string") continue;
1534
+ nextFrontmatter[key] = applyVariables(nextFrontmatter[key], variables);
1535
+ }
1536
+ return nextFrontmatter;
1537
+ }
1538
+ function createVariablesPlugin() {
1539
+ return {
1540
+ name: "clarify:variables",
1541
+ hooks: { "content:transform": (input, ctx) => ({
1542
+ ...input,
1543
+ frontmatter: applyVariablesToFrontmatter(input.frontmatter, ctx.projectConfig.variables),
1544
+ content: applyVariables(input.content, ctx.projectConfig.variables)
1545
+ }) }
1546
+ };
1547
+ }
1548
+ //#endregion
1338
1549
  //#region source/core/builtin.ts
1339
1550
  function createBuiltinPlugins(options = {}) {
1340
1551
  const plugins = [
1552
+ createVariablesPlugin(),
1341
1553
  createOpenAPIPlugin(),
1342
1554
  createSourceLinksPlugin(),
1343
1555
  createContentArtifactsPlugin(),
@@ -1406,6 +1618,13 @@ var clarifyFooterConfigSchema = zod.z.object({
1406
1618
  socials: zod.z.record(zod.z.string(), zod.z.string()).optional(),
1407
1619
  copyright: clarifyLocalizedTextSchema.optional()
1408
1620
  }).strict();
1621
+ var clarifyVariableValueSchema = zod.z.lazy(() => zod.z.union([
1622
+ zod.z.string(),
1623
+ zod.z.number(),
1624
+ zod.z.boolean(),
1625
+ zod.z.record(zod.z.string(), clarifyVariableValueSchema)
1626
+ ]));
1627
+ var clarifyVariablesConfigSchema = zod.z.record(zod.z.string(), clarifyVariableValueSchema);
1409
1628
  var clarifySourceConfigSchema = zod.z.object({
1410
1629
  repository: zod.z.string(),
1411
1630
  branch: zod.z.string().optional(),
@@ -1483,9 +1702,11 @@ var clarifyProjectConfigSchema = zod.z.object({
1483
1702
  favicon: clarifyFaviconConfigSchema.optional(),
1484
1703
  theme: clarifyThemeConfigSchema.optional(),
1485
1704
  routePrefix: zod.z.string().optional(),
1705
+ assetPrefix: zod.z.string().optional(),
1486
1706
  navbar: zod.z.object({ links: zod.z.array(clarifyNavbarLinkSchema).optional() }).optional(),
1487
1707
  banner: clarifyBannerConfigSchema.optional(),
1488
1708
  footer: clarifyFooterConfigSchema.optional(),
1709
+ variables: clarifyVariablesConfigSchema.optional(),
1489
1710
  i18n: clarifyI18nConfigSchema.optional(),
1490
1711
  tabs: clarifyTabsConfigSchema.optional()
1491
1712
  });
@@ -1545,7 +1766,22 @@ function resolveI18nConfig(i18n) {
1545
1766
  locales: i18n.locales
1546
1767
  };
1547
1768
  }
1769
+ function resolveRoutePrefix(routePrefix) {
1770
+ const trimmed = routePrefix?.trim();
1771
+ if (!trimmed || trimmed === "/") return "/";
1772
+ return `/${trimmed.replace(/^\/+|\/+$/g, "")}/`;
1773
+ }
1774
+ function resolveAssetPrefix(assetPrefix, routePrefix) {
1775
+ const trimmed = assetPrefix?.trim();
1776
+ if (trimmed === void 0) return routePrefix;
1777
+ if (trimmed === "./" || trimmed === "") return trimmed || "/";
1778
+ if (!trimmed || trimmed === "/") return "/";
1779
+ if (/^[a-z][a-z\d+.-]*:\/\//i.test(trimmed)) return trimmed.endsWith("/") ? trimmed : `${trimmed}/`;
1780
+ if (trimmed.startsWith("./") || trimmed.startsWith("../")) return trimmed.endsWith("/") ? trimmed : `${trimmed}/`;
1781
+ return `/${trimmed.replace(/^\/+|\/+$/g, "")}/`;
1782
+ }
1548
1783
  function resolveProjectConfig(config = {}) {
1784
+ const routePrefix = resolveRoutePrefix(config.routePrefix);
1549
1785
  return {
1550
1786
  title: config.title ?? "Clarify Docs",
1551
1787
  description: config.description ?? "",
@@ -1554,11 +1790,13 @@ function resolveProjectConfig(config = {}) {
1554
1790
  logo: config.logo,
1555
1791
  homeUrl: config.homeUrl,
1556
1792
  favicon: config.favicon,
1557
- routePrefix: config.routePrefix ?? "/",
1793
+ routePrefix,
1794
+ assetPrefix: resolveAssetPrefix(config.assetPrefix, routePrefix),
1558
1795
  theme: resolveThemeConfig(config.theme),
1559
1796
  navbar: config.navbar,
1560
1797
  banner: config.banner,
1561
1798
  footer: config.footer,
1799
+ variables: config.variables ?? {},
1562
1800
  i18n: resolveI18nConfig(config.i18n),
1563
1801
  tabs: config.tabs
1564
1802
  };
@@ -1612,57 +1850,6 @@ function writeClarifyEnvDts(projectRoot, plugins) {
1612
1850
  (0, node_fs.writeFileSync)(filePath, next, "utf-8");
1613
1851
  }
1614
1852
  //#endregion
1615
- //#region source/core/hooks.ts
1616
- async function runHooks(plugins, hookName, input, ctx) {
1617
- let result = input;
1618
- for (const plugin of plugins) {
1619
- const hook = plugin.hooks?.[hookName];
1620
- if (!hook) continue;
1621
- try {
1622
- result = await hook(result, ctx);
1623
- } catch (err) {
1624
- throw new Error(`[clarify] plugin "${plugin.name}" hook "${hookName}" failed: ${err}`, { cause: err });
1625
- }
1626
- }
1627
- return result;
1628
- }
1629
- async function runDevConfigureServerHooks(plugins, server, ctx) {
1630
- for (const plugin of plugins) {
1631
- const hook = plugin.hooks?.["dev:configureServer"];
1632
- if (!hook) continue;
1633
- try {
1634
- await hook(server, ctx);
1635
- } catch (err) {
1636
- throw new Error(`[clarify] plugin "${plugin.name}" hook "dev:configureServer" failed: ${err}`, { cause: err });
1637
- }
1638
- }
1639
- }
1640
- async function runBuildAssetsHooks(plugins, ctx) {
1641
- const assets = [];
1642
- for (const plugin of plugins) {
1643
- const hook = plugin.hooks?.["build:assets"];
1644
- if (!hook) continue;
1645
- try {
1646
- const pluginAssets = await hook(ctx);
1647
- assets.push(...pluginAssets);
1648
- } catch (err) {
1649
- throw new Error(`[clarify] plugin "${plugin.name}" hook "build:assets" failed: ${err}`, { cause: err });
1650
- }
1651
- }
1652
- return assets;
1653
- }
1654
- async function runBuildDoneHooks(plugins, ctx) {
1655
- for (const plugin of plugins) {
1656
- const hook = plugin.hooks?.["build:done"];
1657
- if (!hook) continue;
1658
- try {
1659
- await hook(ctx);
1660
- } catch (err) {
1661
- throw new Error(`[clarify] plugin "${plugin.name}" hook "build:done" failed: ${err}`, { cause: err });
1662
- }
1663
- }
1664
- }
1665
- //#endregion
1666
1853
  //#region source/core/options.ts
1667
1854
  function resolveBuildOptions(options = {}) {
1668
1855
  return {
@@ -1678,7 +1865,7 @@ async function discoverRoutesForRoot(routeRoot, locale, plugins, ctx) {
1678
1865
  return (await runHooks(plugins, "routes:discover", {
1679
1866
  contentRoot: routeRoot,
1680
1867
  locale,
1681
- routes: findContentRoutes(routeRoot)
1868
+ routes: await findContentRoutes(routeRoot, routeRoot, { contentProcessor: getProjectContentProcessor(ctx) })
1682
1869
  }, ctx)).routes;
1683
1870
  }
1684
1871
  async function discoverRoutes(root, contentRoot, plugins, ctx) {
@@ -1743,6 +1930,7 @@ async function resolveClarifySite(options = {}, resolveOptions = {}) {
1743
1930
  routes: [],
1744
1931
  navigation: []
1745
1932
  };
1933
+ setProjectContentProcessor(ctx, createProjectContentProcessor(plugins, ctx));
1746
1934
  let routes = await discoverRoutes(root, contentRoot, plugins, ctx);
1747
1935
  routes = await runHooks(plugins, "routes:discovered", routes, ctx);
1748
1936
  routes = applyConfiguredPageRoutePaths(routes, projectConfig.tabs, projectConfig.i18n);
@@ -2071,7 +2259,7 @@ function clarifyPlugin(options = {}) {
2071
2259
  async config() {
2072
2260
  await resolveRoutesAndSpecs();
2073
2261
  return {
2074
- base: projectConfig.routePrefix,
2262
+ base: projectConfig.assetPrefix,
2075
2263
  build: {
2076
2264
  ...generateOptions.outputDirectory ? { outDir: generateOptions.outputDirectory } : {},
2077
2265
  manifest: true
@@ -2246,4 +2434,4 @@ Object.defineProperty(exports, "resolveClarifySite", {
2246
2434
  }
2247
2435
  });
2248
2436
 
2249
- //# sourceMappingURL=plugin-B7c0iHMy.cjs.map
2437
+ //# sourceMappingURL=plugin-DyceHdXd.cjs.map