Skip to content

Commit

Permalink
fix(core): fixes ES Module detection for default imports with relativ…
Browse files Browse the repository at this point in the history
…e paths or scoped packages (#2380)
  • Loading branch information
FabianLars committed Aug 10, 2021
1 parent 8e48029 commit b2b36cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/fix-esm-detection.md
@@ -0,0 +1,5 @@
---
"tauri": patch
---

Fix ES Module detection for default imports with relative paths or scoped packages.
2 changes: 1 addition & 1 deletion core/tauri-codegen/src/embedded_assets.rs
Expand Up @@ -196,7 +196,7 @@ impl EmbeddedAssets {
"import \\*",
"import (\"|');?$",
"import\\(",
"import (.|\n)+ from (\"|')([A-Za-z\\-]+)(\"|')",
"import (.|\n)+ from (\"|')([A-Za-z/\\.@-]+)(\"|')",
// export keywords
"export\\{",
"export \\{",
Expand Down

0 comments on commit b2b36cf

Please sign in to comment.