Skip to content

Commit

Permalink
fix: include theme windi css scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jun 8, 2021
1 parent 898f166 commit 14aee82
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/slidev/node/plugins/windicss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ export async function createWindiCSSPlugin(
return config
},
onOptionsResolved(config) {
themeRoots.forEach((i) => {
config.scanOptions.include.push(`${i}/components/*.{vue,ts}`)
config.scanOptions.include.push(`${i}/layouts/*.{vue,ts}`)
})
config.scanOptions.include.push(`!${slash(resolve(userRoot, 'node_modules'))}`)
config.scanOptions.exclude.push(dirname(resolveImportPath('monaco-editor/package.json', true)))
config.scanOptions.exclude.push(dirname(resolveImportPath('katex/package.json', true)))
Expand Down

0 comments on commit 14aee82

Please sign in to comment.