baraqex 2.0.5 → 2.0.6
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
|
@@ -63,11 +63,20 @@ function buildWasm() {
|
|
|
63
63
|
|
|
64
64
|
function copyRuntime() {
|
|
65
65
|
const root = goRoot();
|
|
66
|
-
const
|
|
66
|
+
const candidates = [
|
|
67
|
+
path.join(root, 'lib', 'wasm', 'wasm_exec.js'),
|
|
68
|
+
path.join(root, 'misc', 'wasm', 'wasm_exec.js')
|
|
69
|
+
];
|
|
70
|
+
const wasmExec = candidates.find((p) => existsSync(p));
|
|
67
71
|
const dest = path.join(outputDir, 'wasm_exec.js');
|
|
68
72
|
|
|
69
|
-
if (!
|
|
70
|
-
console.warn(
|
|
73
|
+
if (!wasmExec) {
|
|
74
|
+
console.warn(
|
|
75
|
+
'⚠️ wasm_exec.js not found in this Go install. ' +
|
|
76
|
+
'Copy it to public/wasm/wasm_exec.js manually:\n' +
|
|
77
|
+
` cp "${candidates.join('" OR "')}" ${dest}\n` +
|
|
78
|
+
'(location varies by Go version: misc/wasm or lib/wasm)'
|
|
79
|
+
);
|
|
71
80
|
return;
|
|
72
81
|
}
|
|
73
82
|
|