diff --git a/packages/integrations/markdoc/src/config.ts b/packages/integrations/markdoc/src/config.ts index f612b4f2b9e6..c62bfebab4a7 100644 --- a/packages/integrations/markdoc/src/config.ts +++ b/packages/integrations/markdoc/src/config.ts @@ -8,9 +8,7 @@ import type { } from '@markdoc/markdoc'; import _Markdoc from '@markdoc/markdoc'; import type { AstroInstance } from 'astro'; -import { assetsConfig } from './assets-config.js'; -import { heading, setupHeadingConfig } from './heading-ids.js'; -import { mergeConfig } from './runtime.js'; +import { heading } from './heading-ids.js'; import { componentConfigSymbol } from './utils.js'; export type Render = ComponentConfig | AstroInstance['default'] | string; @@ -53,5 +51,3 @@ export function component(pathnameOrPkgName: string, namedExport?: string): Comp function isNpmPackageName(pathname: string) { return !isRelativePath(pathname) && !pathname.startsWith('/'); } - -export const baseConfig = mergeConfig(setupHeadingConfig(), assetsConfig); diff --git a/packages/integrations/markdoc/src/assets-config.ts b/packages/integrations/markdoc/src/runtime-assets-config.ts similarity index 100% rename from packages/integrations/markdoc/src/assets-config.ts rename to packages/integrations/markdoc/src/runtime-assets-config.ts diff --git a/packages/integrations/markdoc/src/runtime.ts b/packages/integrations/markdoc/src/runtime.ts index c7c6dc0f63b5..1ff00e540174 100644 --- a/packages/integrations/markdoc/src/runtime.ts +++ b/packages/integrations/markdoc/src/runtime.ts @@ -7,9 +7,13 @@ import Markdoc, { } from '@markdoc/markdoc'; import type { AstroInstance } from 'astro'; import { createComponent, renderComponent } from 'astro/runtime/server/index.js'; -import { baseConfig, type AstroMarkdocConfig } from './config.js'; +import { type AstroMarkdocConfig } from './config.js'; +import { setupHeadingConfig } from './heading-ids.js'; import { htmlTag } from './html/tagdefs/html.tag.js'; import type { MarkdocIntegrationOptions } from './options.js'; +import { assetsConfig } from './runtime-assets-config.js'; + +export const baseConfig = mergeConfig(setupHeadingConfig(), assetsConfig); /** * Merge user config with default config and set up context (ex. heading ID slugger)