diff options
author | stephan <stephan@noemail.net> | 2023-01-27 03:18:16 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2023-01-27 03:18:16 +0000 |
commit | a0013fbe879fb59843c69610af56b5b9141c9614 (patch) | |
tree | 745f6a4773549b0e3956276f9b53ec560eaa7666 /ext/wasm/api/sqlite3-worker1-promiser.js | |
parent | 67bfea4ea6fb3bba1425079301727d350132cde0 (diff) | |
download | sqlite-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-promiser.js')
-rw-r--r-- | ext/wasm/api/sqlite3-worker1-promiser.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/wasm/api/sqlite3-worker1-promiser.js b/ext/wasm/api/sqlite3-worker1-promiser.js index 7360512d4..1689d3480 100644 --- a/ext/wasm/api/sqlite3-worker1-promiser.js +++ b/ext/wasm/api/sqlite3-worker1-promiser.js @@ -238,6 +238,9 @@ self.sqlite3Worker1Promiser = function callee(config = callee.defaultConfig){ }/*sqlite3Worker1Promiser()*/; self.sqlite3Worker1Promiser.defaultConfig = { worker: function(){ +//#if target=es6-bundler-friendly + return new Worker("sqlite3-worker1.js"); +//#else let theJs = "sqlite3-worker1.js"; if(this.currentScript){ const src = this.currentScript.src.split('/'); @@ -252,6 +255,7 @@ self.sqlite3Worker1Promiser.defaultConfig = { } } return new Worker(theJs + self.location.search); +//#endif }.bind({ currentScript: self?.document?.currentScript }), |