فهرست منبع

fix(core): fixes ES Module detection for default imports with relative paths or scoped packages (#2380)

FabianLars 4 سال پیش
والد
کامیت
b2b36cfe8d
2فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 5 0
      .changes/fix-esm-detection.md
  2. 1 1
      core/tauri-codegen/src/embedded_assets.rs

+ 5 - 0
.changes/fix-esm-detection.md

@@ -0,0 +1,5 @@
+---
+"tauri": patch
+---
+
+Fix ES Module detection for default imports with relative paths or scoped packages.

+ 1 - 1
core/tauri-codegen/src/embedded_assets.rs

@@ -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 \\{",