Skip to content

Commit

Permalink
fix(core): ESM detection when using export async function (#2425)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Aug 14, 2021
1 parent 5ebf389 commit fbf8caf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .changes/fix-esm-detection.md
@@ -1,5 +1,6 @@
---
"tauri": patch
"tauri-codegen": patch
---

Fix ES Module detection for default imports with relative paths or scoped packages.
Fix ES Module detection for default imports with relative paths or scoped packages and exporting of async functions.
2 changes: 1 addition & 1 deletion core/tauri-codegen/src/embedded_assets.rs
Expand Up @@ -202,7 +202,7 @@ impl EmbeddedAssets {
"export \\{",
"export\\*",
"export \\*",
"export (default|class|let|const|function)",
"export (default|class|let|const|function|async)",
])
.unwrap()
.is_match(&js)
Expand Down

0 comments on commit fbf8caf

Please sign in to comment.