Skip to content

Commit 19f1b5d

Browse files
committed
fix(module): Content module options has priority over MDC module options
1 parent 1668284 commit 19f1b5d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/utils/mdc.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ export async function installMDCModule(contentOptions: ModuleOptions, nuxt: Nuxt
1010
const options = nuxt.options as unknown as { mdc: MDCModuleOptions, content: ModuleOptions }
1111
// Install mdc module
1212
const highlight = options.content?.build?.markdown?.highlight as unknown as MDCModuleOptions['highlight']
13-
options.mdc = defu(options.mdc, {
13+
14+
options.mdc = defu({
1415
highlight: highlight ? { ...highlight, noApiRoute: true } : highlight,
1516
components: {
1617
prose: true,
@@ -19,7 +20,7 @@ export async function installMDCModule(contentOptions: ModuleOptions, nuxt: Nuxt
1920
headings: {
2021
anchorLinks: contentOptions.renderer.anchorLinks,
2122
},
22-
}) as MDCModuleOptions
23+
}, options.mdc) as MDCModuleOptions
2324

2425
// Hook into mdc configs and store them for parser
2526
await nuxt.hook('mdc:configSources', async (mdcConfigs) => {

0 commit comments

Comments
 (0)