Skip to content

Commit

Permalink
fix: add remark-github plugin to bundle (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz authored Aug 22, 2022
1 parent abecd8d commit 9d0236b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ export default defineNuxtModule<ModuleOptions>({
context.markdown.remarkPlugins = context.markdown.remarkPlugins || {}
context.markdown.remarkPlugins['remark-github'] = { repository: `${options.owner}/${options.repo}` }
})
// Add `remark-github` plugin to bundle
nuxt.hook('nitro:config', (nitroConfig) => {
nitroConfig.externals.traceInclude = nitroConfig.externals.traceInclude || []
nitroConfig.externals.traceInclude.push('node_modules/remark-github/index.js')
})
}

const nitroConfig = nuxt.options.nitro
Expand Down

0 comments on commit 9d0236b

Please # to comment.