Skip to content

Commit

Permalink
fix: seperate source and dep for dymamic import after build
Browse files Browse the repository at this point in the history
  • Loading branch information
sanyuan0704 committed Dec 24, 2021
1 parent a96bdd9 commit 50595f0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/vite/src/node/build.ts
Expand Up @@ -649,10 +649,13 @@ function createMoveToVendorChunkFn(config: ResolvedConfig): GetManualChunk {
return (id, { getModuleInfo }) => {
if (
id.includes('node_modules') &&
!isCSSRequest(id) &&
staticImportedByEntry(id, getModuleInfo, cache)
!isCSSRequest(id)
) {
return 'vendor'
if (staticImportedByEntry(id, getModuleInfo, cache)) {
return 'vendor'
} else {
return 'async-vendor';
}
}
}
}
Expand Down

0 comments on commit 50595f0

Please sign in to comment.