Skip to content

Commit

Permalink
fix(astro): respect Astro's srcDir config (#2326)
Browse files Browse the repository at this point in the history
  • Loading branch information
kidonng committed Mar 8, 2023
1 parent 0e8dcbb commit 134aa79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/astro/src/index.ts
Expand Up @@ -43,7 +43,7 @@ export default function UnoCSSAstroIntegration<Theme extends {}>(
// Adding components to UnoCSS's extra content
options.extraContent ||= {}
options.extraContent.filesystem ||= []
options.extraContent.filesystem.push(resolve(fileURLToPath(config.root), 'src/components/**/*').replace(/\\/g, '/'))
options.extraContent.filesystem.push(resolve(fileURLToPath(config.srcDir), 'components/**/*').replace(/\\/g, '/'))

config.vite.plugins ||= []
config.vite.plugins.push(...VitePlugin(options, defaults) as any)
Expand Down

0 comments on commit 134aa79

Please sign in to comment.