Skip to content

Commit e418d5e

Browse files
authored
perf: set filter for import analysis build plugin (#266)
1 parent b53667a commit e418d5e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/vite/src/node/plugins/importAnalysisBuild.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,8 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin[] {
247247
},
248248

249249
transform: {
250+
filter: { code: dynamicImportPrefixRE },
250251
async handler(source, importer) {
251-
if (!dynamicImportPrefixRE.test(source)) {
252-
return
253-
}
254-
255252
await init
256253

257254
let imports: readonly ImportSpecifier[] = []

0 commit comments

Comments
 (0)