fix: use _ as word boundary in IIFE var names (#1630)

* fix: use `_` as word boundary in IIFE var names

* Revert "fix: use `_` as word boundary in IIFE var names"

This reverts commit 396ed3fa56.

* Reapply "fix: use `_` as word boundary in IIFE var names"

This reverts commit f31de7dab3.
This commit is contained in:
Fabian-Lars
2024-08-07 14:14:17 +02:00
committed by GitHub
parent 901dd560be
commit 2c00c0292c
7 changed files with 18 additions and 6 deletions
+4 -1
View File
@@ -32,7 +32,10 @@ export function createConfig(options = {}) {
const pluginJsName = pkg.name
.replace("@tauri-apps/plugin-", "")
.replace(/-./g, (x) => x[1].toUpperCase());
const iifeVarName = `__TAURI_PLUGIN_${pluginJsName.toUpperCase()}__`;
const iifeVarName = `__TAURI_PLUGIN_${pkg.name
.replace("@tauri-apps/plugin-", "")
.replace("-", (x) => "_")
.toUpperCase()}__`;
return [
{