aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-worker1.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2023-01-27 03:18:16 +0000
committerstephan <stephan@noemail.net>2023-01-27 03:18:16 +0000
commita0013fbe879fb59843c69610af56b5b9141c9614 (patch)
tree745f6a4773549b0e3956276f9b53ec560eaa7666 /ext/wasm/api/sqlite3-worker1.js
parent67bfea4ea6fb3bba1425079301727d350132cde0 (diff)
downloadsqlite-a0013fbe879fb59843c69610af56b5b9141c9614.tar.gz
sqlite-a0013fbe879fb59843c69610af56b5b9141c9614.zip
More work on creating a separate sqlite3.js build which is hopefully friendly to JS bundlers.
FossilOrigin-Name: b7b896fb448a7f46eb88eadadb1359255aec637a384cabcdd526276a02f4f0b4
Diffstat (limited to 'ext/wasm/api/sqlite3-worker1.js')
-rw-r--r--ext/wasm/api/sqlite3-worker1.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/wasm/api/sqlite3-worker1.js b/ext/wasm/api/sqlite3-worker1.js
index 4ff19b888..9e9c3ac42 100644
--- a/ext/wasm/api/sqlite3-worker1.js
+++ b/ext/wasm/api/sqlite3-worker1.js
@@ -33,6 +33,9 @@
*/
"use strict";
(()=>{
+//#if target=es6-bundler-friendly
+ importScripts('sqlite3.js');
+//#else
const urlParams = new URL(self.location.href).searchParams;
let theJs = 'sqlite3.js';
if(urlParams.has('sqlite3.dir')){
@@ -40,6 +43,7 @@
}
//console.warn("worker1 theJs =",theJs);
importScripts(theJs);
+//#endif
sqlite3InitModule().then((sqlite3)=>{
sqlite3.initWorker1API();
});