@multiplekex/shallot 0.1.11 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplekex/shallot",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -99,6 +99,9 @@ function isWebviewResource(path: string): boolean {
99
99
  return path.startsWith("/") || path.startsWith("./") || path.startsWith("../");
100
100
  }
101
101
 
102
+ // Dynamic import path to prevent bundler static analysis
103
+ const TAURI_FS_MODULE = "@tauri-apps/" + "plugin-fs";
104
+
102
105
  function createStandaloneRuntime(): Runtime {
103
106
  return {
104
107
  target: "standalone",
@@ -112,7 +115,7 @@ function createStandaloneRuntime(): Runtime {
112
115
  return response.text();
113
116
  }
114
117
  // @ts-ignore - Tauri plugin only available in Tauri context
115
- const { readTextFile } = await import(/* @vite-ignore */ "@tauri-apps/plugin-fs");
118
+ const { readTextFile } = await import(/* @vite-ignore */ TAURI_FS_MODULE);
116
119
  return readTextFile(path);
117
120
  },
118
121
 
@@ -125,7 +128,7 @@ function createStandaloneRuntime(): Runtime {
125
128
  return response.arrayBuffer();
126
129
  }
127
130
  // @ts-ignore - Tauri plugin only available in Tauri context
128
- const { readFile } = await import(/* @vite-ignore */ "@tauri-apps/plugin-fs");
131
+ const { readFile } = await import(/* @vite-ignore */ TAURI_FS_MODULE);
129
132
  const bytes = await readFile(path);
130
133
  return bytes.buffer;
131
134
  },