diff options
Diffstat (limited to 'ext/wasm/api')
-rw-r--r-- | ext/wasm/api/extern-post-js.js | 8 | ||||
-rw-r--r-- | ext/wasm/api/pre-js.js | 2 | ||||
-rw-r--r-- | ext/wasm/api/sqlite3-api-opfs.js | 2 |
3 files changed, 5 insertions, 7 deletions
diff --git a/ext/wasm/api/extern-post-js.js b/ext/wasm/api/extern-post-js.js index 3dc61ae05..acf7068fe 100644 --- a/ext/wasm/api/extern-post-js.js +++ b/ext/wasm/api/extern-post-js.js @@ -8,7 +8,7 @@ most of the associated JS code, runs outside of the Emscripten-generated module init scope, in the current global scope. */ -//#if sqlite3-es6-module-build +//#if target=es6-module const toExportForES6 = //#endif (function(){ @@ -110,10 +110,8 @@ const toExportForES6 = exports["sqlite3InitModule"] = sqlite3InitModule; /* AMD modules get injected in a way we cannot override, so we can't handle those here. */ -//#if sqlite3-es6-module-build - return self.sqlite3InitModule; -//#endif + return self.sqlite3InitModule /* required for ESM */; })(); -//#if sqlite3-es6-module-build +//#if target=es6-module export default toExportForES6; //#endif diff --git a/ext/wasm/api/pre-js.js b/ext/wasm/api/pre-js.js index 41d13d685..2e2fe66bc 100644 --- a/ext/wasm/api/pre-js.js +++ b/ext/wasm/api/pre-js.js @@ -29,7 +29,7 @@ sqlite3InitModuleState.debugModule('self.location =',self.location); 4) If none of the above apply, (prefix+path) is returned. */ Module['locateFile'] = function(path, prefix) { -//#if sqlite3-es6-module-build +//#if target=es6-module return new URL(path, import.meta.url).href; //#else 'use strict'; diff --git a/ext/wasm/api/sqlite3-api-opfs.js b/ext/wasm/api/sqlite3-api-opfs.js index 31fe45eda..a3f73cc7b 100644 --- a/ext/wasm/api/sqlite3-api-opfs.js +++ b/ext/wasm/api/sqlite3-api-opfs.js @@ -167,7 +167,7 @@ const installOpfsVfs = function callee(options){ return promiseReject_(err); }; const W = -//#if sqlite3-es6-module-build +//#if target=es6-module new Worker(new URL(options.proxyUri, import.meta.url)); //#else new Worker(options.proxyUri); |