Commit 30eed2c
fix(kernel-utils): align removeDynamicImportsPlugin fast-path with its regex
The early-return guard `code.includes('import(')` required the token
`import` and `(` to be adjacent, but the replacement regex allows
optional whitespace (`\bimport\s*\(`). A source file containing
`import ('specifier')` (space before the paren) would have been skipped
by the guard and left untransformed, causing Rolldown to reject the
IIFE build despite the plugin's purpose being to prevent that.
Replace the string fast-path with the equivalent regex test so both
paths agree on which files contain dynamic imports.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent aa4deaf commit 30eed2c
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments