Skip to content

Commit fbf8caf

Browse files
authored
fix(core): ESM detection when using export async function (#2425)
1 parent 5ebf389 commit fbf8caf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.changes/fix-esm-detection.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
"tauri": patch
3+
"tauri-codegen": patch
34
---
45

5-
Fix ES Module detection for default imports with relative paths or scoped packages.
6+
Fix ES Module detection for default imports with relative paths or scoped packages and exporting of async functions.

core/tauri-codegen/src/embedded_assets.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ impl EmbeddedAssets {
202202
"export \\{",
203203
"export\\*",
204204
"export \\*",
205-
"export (default|class|let|const|function)",
205+
"export (default|class|let|const|function|async)",
206206
])
207207
.unwrap()
208208
.is_match(&js)

0 commit comments

Comments
 (0)