Skip to content

Commit

Permalink
chore: add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev committed Jul 31, 2023
1 parent 89b24d5 commit e834315
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vite/src/node/plugins/importAnalysisBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,9 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin {
// main chunk is removed
(hasRemovedPureCssChunk && deps.size > 0)
? modulePreload === false
? [...deps].filter((d) => d.endsWith('.css'))
? // CSS deps use the same mechanism as module preloads, so even if disabled,
// we still need to pass these deps to the preload helper in dynamic imports.
[...deps].filter((d) => d.endsWith('.css'))
: [...deps]
: []

Expand Down

0 comments on commit e834315

Please sign in to comment.