Skip to content

Commit 245cf06

Browse files
committed
fix(module): fix build with module enabled
1 parent d88ccea commit 245cf06

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

docs/content/1.index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cta:
1313
secondary:
1414
- Star on GitHub →
1515
- https://github.com/nuxtlabs/github-module
16-
snippet: yarn add @nuxtlabs/github
16+
snippet: yarn add @nuxtlabs/github-module
1717
---
1818

1919
#title

src/module.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -190,18 +190,7 @@ export default defineNuxtModule<ModuleOptions>({
190190
// @ts-ignore
191191
nuxt.hook('content:context', (context) => {
192192
context.markdown.remarkPlugins = context.markdown.remarkPlugins || {}
193-
if (Array.isArray(context.markdown.remarkPlugins)) {
194-
context.markdown.remarkPlugins.push(['remark-github', { repository: `${options.owner}/${options.repo}` }])
195-
} else {
196-
context.markdown.remarkPlugins['remark-github'] = { repository: `${options.owner}/${options.repo}` }
197-
}
198-
})
199-
nuxt.hook('nitro:config', (nitroConfig) => {
200-
// @ts-ignore
201-
nitroConfig.externals.traceInclude = nitroConfig.externals.traceInclude || []
202-
203-
// @ts-ignore
204-
nitroConfig.externals.traceInclude.push('remark-github')
193+
context.markdown.remarkPlugins['remark-github'] = { repository: `${options.owner}/${options.repo}` }
205194
})
206195
}
207196

0 commit comments

Comments
 (0)