@blinkk/root 3.4.3 → 3.4.4

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.
@@ -2,7 +2,7 @@ import {
2
2
  BuildAssetMap,
3
3
  ElementGraph,
4
4
  buildPage
5
- } from "./chunk-JVU3B3XH.js";
5
+ } from "./chunk-2VA63JTI.js";
6
6
  import {
7
7
  loadBundledConfig,
8
8
  loadJson
@@ -94,12 +94,12 @@ async function getElements(rootConfig, pods, options) {
94
94
  const excludeElement = (moduleId) => {
95
95
  return excludePatterns.some((pattern) => Boolean(moduleId.match(pattern)));
96
96
  };
97
- const excludeElements = options?.isSsgBuild ? rootConfig.build?.excludeElements : void 0;
97
+ const excludeFromSsg = options?.isSsgBuild ? rootConfig.elements?.excludeFromSsg : void 0;
98
98
  const excludeTagName = (tagName) => {
99
- if (!excludeElements) {
99
+ if (!excludeFromSsg) {
100
100
  return false;
101
101
  }
102
- return matchesTagName(tagName, excludeElements);
102
+ return matchesTagName(tagName, excludeFromSsg);
103
103
  };
104
104
  const elementFilePaths = {};
105
105
  for (const dirPath of elementsDirs) {
@@ -427,4 +427,4 @@ export {
427
427
  BuildAssetMap,
428
428
  buildPage
429
429
  };
430
- //# sourceMappingURL=chunk-JVU3B3XH.js.map
430
+ //# sourceMappingURL=chunk-2VA63JTI.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/node/element-graph.ts", "../src/render/asset-map/build-asset-map.ts", "../src/cli/build-page.ts"],
4
+ "sourcesContent": ["import fs from 'node:fs';\nimport path from 'node:path';\nimport glob from 'tiny-glob';\nimport {searchForWorkspaceRoot} from 'vite';\nimport {ElementTagNameMatcher, RootConfig} from '../core/config.js';\nimport {isValidTagName, parseTagNames} from '../utils/elements.js';\nimport {directoryContains, isDirectory, isJsFile} from '../utils/fsutils.js';\nimport type {ResolvedPod} from './pod-collector.js';\n\ninterface ElementSourceFile {\n /** Full file path. */\n filePath: string;\n /** Path relative to the root project directory. */\n relPath: string;\n}\n\n/**\n * Dependency graph for element files to capture which other elements are used\n * by any particular element.\n */\nexport class ElementGraph {\n /**\n * Element tagName => sourceFile.\n */\n readonly sourceFiles: {[tagName: string]: ElementSourceFile} = {};\n\n /**\n * Element tagName => set of element tagName dependencies.\n */\n private deps: Record<string, string[]> = {};\n\n constructor(sourceFiles: {[tagName: string]: ElementSourceFile}) {\n this.sourceFiles = sourceFiles;\n }\n\n toJson() {\n for (const tagName in this.sourceFiles) {\n this.deps[tagName] ??= this.parseDepsFromSource(tagName);\n }\n return {\n sourceFiles: this.sourceFiles,\n deps: this.deps,\n };\n }\n\n static fromJson(data: {deps: any; sourceFiles: any}) {\n const graph = new ElementGraph(data.sourceFiles);\n graph.deps = data.deps;\n return graph;\n }\n\n getDeps(tagName: string, visited?: Set<string>): string[] {\n visited ??= new Set();\n if (visited.has(tagName)) {\n return [];\n }\n\n visited.add(tagName);\n this.deps[tagName] ??= this.parseDepsFromSource(tagName);\n\n const deps = new Set(this.deps[tagName]);\n for (const depTagName of this.deps[tagName]) {\n for (const childDep of this.getDeps(depTagName, visited)) {\n deps.add(childDep);\n }\n }\n return Array.from(deps);\n }\n\n /**\n * Parses an element's source file for usage of other custom elements.\n */\n private parseDepsFromSource(tagName: string): string[] {\n const srcFile = this.sourceFiles[tagName];\n if (!srcFile) {\n throw new Error(`could not find file path for tagName <${tagName}>`);\n }\n const src = fs.readFileSync(srcFile.filePath, 'utf-8');\n const tagNames = parseTagNames(src);\n const deps = new Set<string>();\n for (const depTagName of tagNames) {\n if (depTagName !== tagName && depTagName in this.sourceFiles) {\n deps.add(depTagName);\n }\n }\n return Array.from(deps);\n }\n}\n\nexport interface GetElementsOptions {\n /**\n * Whether the element graph is being built for the SSG phase of\n * `root build`. When true, elements matching `elements.excludeFromSsg` are\n * left out of the graph. The dev server and `root build --ssr-only` leave\n * this unset, since both render pages on demand and should keep serving the\n * excluded elements.\n */\n isSsgBuild?: boolean;\n}\n\n/**\n * Returns true if a tag name matches an `ElementTagNameMatcher`. Strings are\n * matched exactly, RegEx patterns are tested against the tag name, and a\n * function is called with the tag name.\n */\nfunction matchesTagName(\n tagName: string,\n matcher: ElementTagNameMatcher\n): boolean {\n if (typeof matcher === 'function') {\n return matcher(tagName);\n }\n return matcher.some((pattern) => {\n if (typeof pattern === 'string') {\n return pattern === tagName;\n }\n return Boolean(tagName.match(pattern));\n });\n}\n\n/**\n * Returns a map of all the element file definitions in the project.\n */\nexport async function getElements(\n rootConfig: RootConfig,\n pods?: ResolvedPod[],\n options?: GetElementsOptions\n): Promise<ElementGraph> {\n const rootDir = rootConfig.rootDir;\n\n const elementsDirs = getElementsDirs(rootConfig, pods);\n const excludePatterns = rootConfig.elements?.exclude || [];\n const excludeElement = (moduleId: string) => {\n return excludePatterns.some((pattern) => Boolean(moduleId.match(pattern)));\n };\n\n // `elements.excludeFromSsg` matches tag names and only applies to the SSG\n // output, which keeps the excluded elements working anywhere pages are\n // rendered on demand (the dev server, `--ssr-only` builds).\n const excludeFromSsg = options?.isSsgBuild\n ? rootConfig.elements?.excludeFromSsg\n : undefined;\n const excludeTagName = (tagName: string) => {\n if (!excludeFromSsg) {\n return false;\n }\n return matchesTagName(tagName, excludeFromSsg);\n };\n\n const elementFilePaths: {[tagName: string]: ElementSourceFile} = {};\n for (const dirPath of elementsDirs) {\n if (await isDirectory(dirPath)) {\n const files = await glob('**/*', {cwd: dirPath});\n files.forEach((file) => {\n const parts = path.parse(file);\n if (isJsFile(parts.base) && isValidTagName(parts.name)) {\n const tagName = parts.name;\n const filePath = path.join(dirPath, file);\n const relPath = path.relative(rootDir, filePath);\n if (!excludeElement(relPath) && !excludeTagName(tagName)) {\n elementFilePaths[tagName] = {filePath, relPath};\n }\n }\n });\n }\n }\n\n const graph = new ElementGraph(elementFilePaths);\n return graph;\n}\n\n/**\n * Get all element dirs.\n */\nexport function getElementsDirs(rootConfig: RootConfig, pods?: ResolvedPod[]) {\n const rootDir = rootConfig.rootDir;\n const workspaceRoot = searchForWorkspaceRoot(rootDir);\n\n const elementsDirs = [path.join(rootDir, 'elements')];\n const elementsInclude = rootConfig.elements?.include || [];\n\n for (const dirPath of elementsInclude) {\n const elementsDir = path.resolve(rootDir, dirPath);\n if (!directoryContains(rootDir, elementsDir)) {\n throw new Error(\n `the elements dir (${dirPath}) should be within the project's workspace (${workspaceRoot})`\n );\n }\n elementsDirs.push(elementsDir);\n }\n\n // Pod-contributed element dirs bypass the workspace containment check\n // because they are trusted (registered by plugins, not user input).\n if (pods) {\n for (const pod of pods) {\n for (const dir of pod.elementsDirs) {\n elementsDirs.push(dir);\n }\n }\n }\n\n return elementsDirs;\n}\n", "import fs from 'node:fs';\nimport path from 'node:path';\nimport {Manifest} from 'vite';\nimport {RootConfig} from '../../core/config.js';\nimport {ElementGraph} from '../../node/element-graph.js';\nimport {isJsFile} from '../../utils/fsutils.js';\nimport {Asset, AssetMap} from './asset-map.js';\n\nexport type BuildAssetManifest = Record<\n string,\n {\n src: string;\n assetUrl: string;\n importedModules: string[];\n importedCss: string[];\n isElement: boolean;\n }\n>;\n\n/**\n * A pod route, used to alias the route's virtual `pod/<name>/...` src to the\n * real asset built from the route's file. See `fromViteManifest()`.\n */\nexport interface PodRouteAsset {\n /** Virtual src, e.g. `pod/<name>/<relPath>`. */\n src: string;\n /** Absolute path to the pod route file. */\n filePath: string;\n}\n\nexport class BuildAssetMap implements AssetMap {\n private rootConfig: RootConfig;\n private srcToAsset: Map<string, BuildAsset>;\n\n constructor(rootConfig: RootConfig) {\n this.rootConfig = rootConfig;\n this.srcToAsset = new Map();\n }\n\n get(src: string): Asset | null {\n const asset = this.find(src);\n if (asset) {\n return asset;\n }\n console.log(`could not find build asset: ${src}`);\n return null;\n }\n\n private find(src: string): BuildAsset | undefined {\n const asset = this.srcToAsset.get(src);\n if (asset) {\n return asset;\n }\n // Try resolving the realpath of the asset, following symlinks.\n const realSrc = realPathRelativeTo(this.rootConfig.rootDir, src);\n if (realSrc !== src) {\n const asset = this.srcToAsset.get(realSrc);\n if (asset) {\n return asset;\n }\n }\n return undefined;\n }\n\n private add(asset: BuildAsset) {\n this.srcToAsset.set(asset.src, asset);\n }\n\n toJson(): BuildAssetManifest {\n const result: BuildAssetManifest = {};\n for (const src of this.srcToAsset.keys()) {\n result[src] = this.srcToAsset.get(src)!.toJson();\n }\n return result;\n }\n\n static fromViteManifest(\n rootConfig: RootConfig,\n clientManifest: Manifest,\n elementsGraph: ElementGraph,\n podRoutes: PodRouteAsset[] = []\n ) {\n const assetMap = new BuildAssetMap(rootConfig);\n\n const elementFiles = new Set();\n Object.values(elementsGraph.sourceFiles).forEach((elementSource) => {\n elementFiles.add(elementSource.relPath);\n // Vite will resolve symlinks, so we need to follow the src and add the\n // realpath to the element files.\n const realSrc = realPathRelativeTo(\n rootConfig.rootDir,\n elementSource.relPath\n );\n if (realSrc !== elementSource.filePath) {\n elementFiles.add(realSrc);\n }\n });\n\n Object.keys(clientManifest).forEach((manifestKey) => {\n const src = manifestKey;\n const manifestChunk = clientManifest[manifestKey];\n const isElement = elementFiles.has(src);\n // NOTES(stevenle): routes/ files are included in the manifest for\n // their CSS deps, but do not have an asset URL.\n const assetUrl =\n src.startsWith('routes/') && isJsFile(src)\n ? ''\n : `/${manifestChunk.file}`;\n const assetData = {\n src: src,\n assetUrl: assetUrl,\n importedModules: manifestChunk.imports || [],\n importedCss: (manifestChunk.css || []).map((relPath) => `/${relPath}`),\n isElement: isElement,\n };\n assetMap.add(new BuildAsset(assetMap, assetData));\n });\n\n // Pod routes are looked up by their virtual `pod/<name>/...` src at render\n // time, but the manifest keys them by their real file path. Register an\n // alias for each pod route so `get(route.src)` resolves to the built asset\n // (and the route's CSS deps are collected) instead of logging\n // \"could not find build asset\". Like user `routes/`, the alias has no asset\n // URL of its own (the route's client JS is injected via elements/bundles).\n podRoutes.forEach((podRoute) => {\n if (assetMap.srcToAsset.has(podRoute.src)) {\n return;\n }\n const relPath = path\n .relative(rootConfig.rootDir, podRoute.filePath)\n .replace(/\\\\/g, '/');\n // `realPathRelativeTo()` returns a `path.relative()` result with\n // OS-specific separators; normalize to forward slashes to match the\n // manifest keys (and `relPath` above) on Windows/symlinked setups.\n const realPath = realPathRelativeTo(rootConfig.rootDir, relPath).replace(\n /\\\\/g,\n '/'\n );\n const candidateKeys = [relPath, realPath];\n for (const key of candidateKeys) {\n const asset = assetMap.srcToAsset.get(key);\n if (asset) {\n assetMap.add(\n new BuildAsset(assetMap, {\n ...asset.toJson(),\n src: podRoute.src,\n assetUrl: '',\n })\n );\n break;\n }\n }\n });\n\n return assetMap;\n }\n\n static fromRootManifest(\n rootConfig: RootConfig,\n rootManifest: BuildAssetManifest\n ) {\n const assetMap = new BuildAssetMap(rootConfig);\n Object.keys(rootManifest).forEach((moduleId) => {\n const assetData = rootManifest[moduleId];\n assetMap.add(new BuildAsset(assetMap, assetData));\n });\n return assetMap;\n }\n}\n\n/**\n * Returns the realpath of a src file, relative to the rootDir.\n */\nfunction realPathRelativeTo(rootDir: string, src: string) {\n const fullPath = path.resolve(rootDir, src);\n if (!fs.existsSync(fullPath)) {\n return src;\n }\n const realpath = fs.realpathSync(path.resolve(rootDir, src));\n return path.relative(rootDir, realpath);\n}\n\n/**\n * Returns true if a serving URL points to a JS module.\n */\nfunction isJsAssetUrl(assetUrl: string) {\n return assetUrl.endsWith('.js') || assetUrl.endsWith('.mjs');\n}\n\nexport class BuildAsset {\n src: string;\n assetUrl: string;\n private assetMap: BuildAssetMap;\n private importedModules: string[];\n private importedCss: string[];\n isElement: boolean;\n\n constructor(\n assetMap: BuildAssetMap,\n assetData: {\n src: string;\n assetUrl: string;\n importedModules: string[];\n importedCss: string[];\n isElement: boolean;\n }\n ) {\n this.assetMap = assetMap;\n this.src = assetData.src;\n this.assetUrl = assetData.assetUrl;\n this.importedModules = assetData.importedModules;\n this.importedCss = assetData.importedCss;\n this.isElement = assetData.isElement;\n }\n\n async getCssDeps(): Promise<string[]> {\n const visited = new Set<string>();\n const deps = new Set<string>();\n await this.collectCss(this, deps, visited);\n return Array.from(deps);\n }\n\n async getJsDeps(): Promise<string[]> {\n const visited = new Set<string>();\n const deps = new Set<string>();\n await this.collectJs(this, deps, visited);\n return Array.from(deps);\n }\n\n async getModulePreloadDeps(): Promise<string[]> {\n // Seed `visited` with this asset so that the walk starts at the imported\n // modules and this asset's own URL is left out of the results.\n const visited = new Set<string>([this.src]);\n const deps = new Set<string>();\n await this.collectModulePreload(this.importedModules, deps, visited);\n return Array.from(deps);\n }\n\n private async collectJs(\n asset: BuildAsset | null,\n urls: Set<string>,\n visited: Set<string>\n ) {\n if (!asset) {\n return;\n }\n if (!asset.src) {\n return;\n }\n if (visited.has(asset.src)) {\n return;\n }\n visited.add(asset.src);\n if (asset.isElement) {\n urls.add(asset.assetUrl);\n }\n await Promise.all(\n asset.importedModules.map(async (src) => {\n const importedAsset = (await this.assetMap.get(src)) as BuildAsset;\n this.collectJs(importedAsset, urls, visited);\n })\n );\n }\n\n /**\n * Walks `srcs` and their transitive imports, collecting the JS chunk URL of\n * every module along the way.\n */\n private async collectModulePreload(\n srcs: string[],\n urls: Set<string>,\n visited: Set<string>\n ) {\n await Promise.all(\n srcs.map(async (src) => {\n if (visited.has(src)) {\n return;\n }\n visited.add(src);\n const asset = (await this.assetMap.get(src)) as BuildAsset | null;\n if (!asset || !asset.src) {\n return;\n }\n // Route files have no asset URL of their own, and CSS deps are\n // injected as stylesheets rather than preloaded.\n if (asset.assetUrl && isJsAssetUrl(asset.assetUrl)) {\n urls.add(asset.assetUrl);\n }\n await this.collectModulePreload(asset.importedModules, urls, visited);\n })\n );\n }\n\n private async collectCss(\n asset: BuildAsset | null,\n urls: Set<string>,\n visited: Set<string>\n ) {\n if (!asset) {\n return;\n }\n if (!asset.src) {\n return;\n }\n if (visited.has(asset.src)) {\n return;\n }\n visited.add(asset.src);\n if (asset.importedCss) {\n asset.importedCss.forEach((cssUrl) => urls.add(cssUrl));\n }\n await Promise.all(\n asset.importedModules.map(async (moduleId) => {\n const importedAsset = (await this.assetMap.get(moduleId)) as BuildAsset;\n this.collectCss(importedAsset, urls, visited);\n })\n );\n }\n\n toJson() {\n return {\n src: this.src,\n assetUrl: this.assetUrl,\n importedModules: this.importedModules,\n importedCss: this.importedCss,\n isElement: this.isElement,\n };\n }\n}\n", "import path from 'node:path';\n\nimport {RootConfig} from '../core/config.js';\nimport {Route} from '../core/types.js';\nimport {transformHtml} from '../render/html-transform.js';\nimport {makeDir, writeFile} from '../utils/fsutils.js';\n\ntype Renderer = import('../render/render.js').Renderer;\n\n/** A single page to build during the SSG phase of `root build`. */\nexport interface BuildPageTask {\n /** The url path to build, e.g. `/intl/de/about/`. */\n urlPath: string;\n /** Route params used to build the page. */\n params: Record<string, string>;\n /**\n * The route's src file (e.g. `routes/blog/[slug].tsx`). Used by worker\n * threads to disambiguate overlapping routes that match the same url path.\n */\n routeSrc?: string;\n /** The route's locale, used with `routeSrc` to disambiguate routes. */\n locale?: string;\n}\n\n/** The result of building a single page. */\nexport interface BuildPageResult {\n urlPath: string;\n /** Output file path relative to the build dir. Unset when `notFound`. */\n outFilePath?: string;\n notFound?: boolean;\n /** Whether the output was generated via `getStaticContent()`. */\n staticContent?: boolean;\n}\n\n/** Message sent from the build worker to the main thread. */\nexport type BuildWorkerResponse =\n | {type: 'ready'}\n | {type: 'result'; id: number; result: BuildPageResult}\n | {\n type: 'error';\n id: number;\n urlPath: string;\n params: Record<string, string>;\n routeSrc?: string;\n error: string;\n }\n | {type: 'fatal'; error: string};\n\n/** Message sent from the main thread to the build worker. */\nexport type BuildWorkerRequest = {\n type: 'render';\n id: number;\n task: BuildPageTask;\n};\n\n/**\n * Builds a single page (or static content file) to the build dir. Shared by\n * the in-process SSG build loop and the `--threads` build worker.\n */\nexport async function buildPage(\n renderer: Renderer,\n rootConfig: RootConfig,\n buildDir: string,\n route: Route,\n task: BuildPageTask\n): Promise<BuildPageResult> {\n const {urlPath, params} = task;\n const routeModule = route.module;\n if (routeModule.getStaticContent) {\n let props: any;\n if (routeModule.getStaticProps) {\n props = await routeModule.getStaticProps({\n rootConfig,\n params,\n });\n if (props?.notFound) {\n return {urlPath, notFound: true};\n }\n } else {\n props = {rootConfig, params};\n }\n const result = await routeModule.getStaticContent(props);\n let body: string;\n if (typeof result === 'string') {\n body = result;\n } else if (result && typeof result === 'object') {\n body = result.body;\n } else {\n body = '';\n }\n const outFilePath = urlPath.slice(1);\n const outPath = path.join(buildDir, outFilePath);\n await makeDir(path.dirname(outPath));\n await writeFile(outPath, normalizeLineEndings(body));\n return {urlPath, outFilePath, staticContent: true};\n }\n\n const data = await renderer.renderRoute(route, {\n routeParams: params,\n });\n if (data.notFound) {\n return {urlPath, notFound: true};\n }\n\n let outFilePath = path.join(urlPath.slice(1), 'index.html');\n if (outFilePath.endsWith('404/index.html')) {\n outFilePath = outFilePath.replace('404/index.html', '404.html');\n }\n const outPath = path.join(buildDir, outFilePath);\n\n const html = await transformHtml(data.html || '', rootConfig);\n await writeFile(outPath, normalizeLineEndings(html));\n return {urlPath, outFilePath};\n}\n\nexport function normalizeLineEndings(str: string): string {\n return str.replace(/\\r\\n?/g, '\\n');\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,OAAO,UAAU;AACjB,SAAQ,8BAA6B;AAiB9B,IAAM,eAAN,MAAM,cAAa;AAAA;AAAA;AAAA;AAAA,EAIf,cAAsD,CAAC;AAAA;AAAA;AAAA;AAAA,EAKxD,OAAiC,CAAC;AAAA,EAE1C,YAAY,aAAqD;AAC/D,SAAK,cAAc;AAAA,EACrB;AAAA,EAEA,SAAS;AACP,eAAW,WAAW,KAAK,aAAa;AACtC,WAAK,KAAK,OAAO,MAAM,KAAK,oBAAoB,OAAO;AAAA,IACzD;AACA,WAAO;AAAA,MACL,aAAa,KAAK;AAAA,MAClB,MAAM,KAAK;AAAA,IACb;AAAA,EACF;AAAA,EAEA,OAAO,SAAS,MAAqC;AACnD,UAAM,QAAQ,IA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AQ,EAAC,YAAY,OAAM;AAAA,IAC7B;AACA,UAAM,SAAS,MAAM,YAAY,iBAAiB,KAAK;AACvD,QAAI;AACJ,QAAI,OAAO,WAAW,UAAU;AAC9B,aAAO;AAAA,IACT,WAAW,UAAU,OAAO,WAAW,UAAU;AAC/C,aAAO,OAAO;AAAA,IAChB,OAAO;AACL,aAAO;AAAA,IACT;AACA,UAAMC,eAAc,QAAQ,MAAM,CAAC;AACnC,UAAMC,WAAUC,MAAK,KAAK,UAAUF,YAAW;AAC/C,UAAM,QAAQE,MAAK,QAAQD,QAAO,CAAC;AACnC,UAAM,UAAUA,UAAS,qBAAqB,IAAI,CAAC;AACnD,WAAO,EAAC,SAAS,aAAAD,cAAa,eAAe,KAAI;AAAA,EACnD;AAEA,QAAM,OAAO,MAAM,SAAS,YAAY,OAAO;AAAA,IAC7C,aAAa;AAAA,EACf,CAAC;AACD,MAAI,KAAK,UAAU;AACjB,WAAO,EAAC,SAAS,UAAU,KAAI;AAAA,EACjC;AAEA,MAAI,cAAcE,MAAK,KAAK,QAAQ,MAAM,CAAC,GAAG,YAAY;AAC1D,MAAI,YAAY,SAAS,gBAAgB,GAAG;AAC1C,kBAAc,YAAY,QAAQ,kBAAkB,UAAU;AAAA,EAChE;AACA,QAAM,UAAUA,MAAK,KAAK,UAAU,WAAW;AAE/C,QAAM,OAAO,MAAM,cAAc,KAAK,QAAQ,IAAI,UAAU;AAC5D,QAAM,UAAU,SAAS,qBAAqB,IAAI,CAAC;AACnD,SAAO,EAAC,SAAS,YAAW;AAC9B;AAEO,SAAS,qBAAqB,KAAqB;AACxD,SAAO,IAAI,QAAQ,UAAU,IAAI;AACnC;",
6
+ "names": ["fs", "path", "asset", "path", "fs", "path", "outFilePath", "outPath", "path"]
7
+ }
@@ -13,7 +13,7 @@ import {
13
13
  buildPage,
14
14
  getElements,
15
15
  getElementsDirs
16
- } from "./chunk-JVU3B3XH.js";
16
+ } from "./chunk-2VA63JTI.js";
17
17
  import {
18
18
  bundleRootConfig,
19
19
  copyDir,
@@ -3790,4 +3790,4 @@ export {
3790
3790
  createProdServer,
3791
3791
  CliRunner
3792
3792
  };
3793
- //# sourceMappingURL=chunk-7HWP3HTV.js.map
3793
+ //# sourceMappingURL=chunk-FNAMVXV5.js.map