Skip to content

Commit 232b90f

Browse files
authored
fix: node_modules dependencies shouldn't have dynamic imports modified (#68)
1 parent b49f05f commit 232b90f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ export default function webExtension(
7171
emitQueue = [];
7272
},
7373

74-
renderDynamicImport() {
74+
renderDynamicImport({ moduleId }) {
75+
if (moduleId.includes("node_modules")) {
76+
return null;
77+
}
78+
7579
return {
7680
left: "import((chrome != null ? chrome : browser).runtime.getURL(",
7781
right: "))",

0 commit comments

Comments
 (0)