diff --git a/.changes/fix-esm-detection.md b/.changes/fix-esm-detection.md index c96e70ff1..9bd6c327f 100644 --- a/.changes/fix-esm-detection.md +++ b/.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. diff --git a/core/tauri-codegen/src/embedded_assets.rs b/core/tauri-codegen/src/embedded_assets.rs index 824295409..b8eeba68c 100644 --- a/core/tauri-codegen/src/embedded_assets.rs +++ b/core/tauri-codegen/src/embedded_assets.rs @@ -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)