Skip to content

Commit 9d0236b

Browse files
authored
fix: add remark-github plugin to bundle (#34)
1 parent abecd8d commit 9d0236b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/module.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ export default defineNuxtModule<ModuleOptions>({
9191
context.markdown.remarkPlugins = context.markdown.remarkPlugins || {}
9292
context.markdown.remarkPlugins['remark-github'] = { repository: `${options.owner}/${options.repo}` }
9393
})
94+
// Add `remark-github` plugin to bundle
95+
nuxt.hook('nitro:config', (nitroConfig) => {
96+
nitroConfig.externals.traceInclude = nitroConfig.externals.traceInclude || []
97+
nitroConfig.externals.traceInclude.push('node_modules/remark-github/index.js')
98+
})
9499
}
95100

96101
const nitroConfig = nuxt.options.nitro

0 commit comments

Comments
 (0)