deepwoken 0.2.9 → 0.2.91
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/index.ts +3 -2
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -9,8 +9,9 @@ const wasm = await import('./pkg/deepwoken.js');
|
|
|
9
9
|
|
|
10
10
|
if (typeof process !== 'undefined' && process.versions?.node) {
|
|
11
11
|
const { readFile } = await import('node:fs/promises');
|
|
12
|
-
const {
|
|
13
|
-
const
|
|
12
|
+
const { createRequire } = await import('node:module');
|
|
13
|
+
const require = createRequire(import.meta.url);
|
|
14
|
+
const wasmPath = require.resolve('deepwoken/pkg/deepwoken_bg.wasm');
|
|
14
15
|
await wasm.default(await readFile(wasmPath));
|
|
15
16
|
} else {
|
|
16
17
|
await wasm.default();
|