Skip to content

Commit b2b36cf

Browse files
authored
fix(core): fixes ES Module detection for default imports with relative paths or scoped packages (#2380)
1 parent 8e48029 commit b2b36cf

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Diff for: .changes/fix-esm-detection.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Fix ES Module detection for default imports with relative paths or scoped packages.

Diff for: core/tauri-codegen/src/embedded_assets.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ impl EmbeddedAssets {
196196
"import \\*",
197197
"import (\"|');?$",
198198
"import\\(",
199-
"import (.|\n)+ from (\"|')([A-Za-z\\-]+)(\"|')",
199+
"import (.|\n)+ from (\"|')([A-Za-z/\\.@-]+)(\"|')",
200200
// export keywords
201201
"export\\{",
202202
"export \\{",

0 commit comments

Comments
 (0)