Skip to content

Commit

Permalink
Fix CSS dynamic import in node_modules dependencies
Browse files Browse the repository at this point in the history
Bug describe and reproduce: vitejs#6823
  • Loading branch information
FL3NKEY committed Feb 9, 2022
1 parent e38be3e commit 246f982
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vite/src/node/plugins/importAnalysisBuild.ts
Expand Up @@ -112,7 +112,8 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin {
async transform(source, importer) {
if (
importer.includes('node_modules') &&
!source.includes('import.meta.glob')
!source.includes('import.meta.glob') &&
!source.match(/import\(.+\)/m))
) {
return
}
Expand Down

0 comments on commit 246f982

Please sign in to comment.