Skip to content

Commit d2c9cd6

Browse files
author
Ivan Orlov
committed
fix: improving import syntax detection
closes fuse-box#1414
1 parent 6b7b19d commit d2c9cd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/File.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ export class File {
409409
}
410410
let targetContent = localContent || this.contents;
411411
if (targetContent) {
412-
const expression = /(\s+|^)(import\()/g;
412+
const expression = /(\s+|^|\(|:)(import\()/g;
413413
if (expression.test(targetContent)) {
414414
targetContent = targetContent.replace(expression, "$1$fsmp$(");
415415
if (this.context.fuse && this.context.fuse.producer) {

0 commit comments

Comments
 (0)