lucivy-wasm 3.0.2 → 3.0.4
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/README.md +1 -1
- package/js/lucivy-worker.js +6 -1
- package/package.json +1 -1
- package/pkg/lucivy.wasm +0 -0
package/README.md
CHANGED
package/js/lucivy-worker.js
CHANGED
|
@@ -254,8 +254,13 @@ self.onmessage = async (e) => {
|
|
|
254
254
|
|
|
255
255
|
switch (type) {
|
|
256
256
|
case 'init': {
|
|
257
|
-
|
|
257
|
+
// The page's cache-buster (`?v=`) rides on this worker's URL;
|
|
258
|
+
// pass it on to the engine script and, through locateFile, to
|
|
259
|
+
// the wasm it fetches.
|
|
260
|
+
const bust = self.location.search || '';
|
|
261
|
+
const { default: createLucivy } = await import('../pkg/lucivy.js' + bust);
|
|
258
262
|
Module = await createLucivy({
|
|
263
|
+
locateFile: (path, prefix) => prefix + path + (path.endsWith('.wasm') ? bust : ''),
|
|
259
264
|
// Intercept eprintln! from ALL pthreads and send to diag server.
|
|
260
265
|
printErr: function(text) {
|
|
261
266
|
diagSendLog(text);
|
package/package.json
CHANGED
package/pkg/lucivy.wasm
CHANGED
|
Binary file
|