diff options
Diffstat (limited to 'ext/wasm/api/extern-post-js.c-pp.js')
-rw-r--r-- | ext/wasm/api/extern-post-js.c-pp.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/ext/wasm/api/extern-post-js.c-pp.js b/ext/wasm/api/extern-post-js.c-pp.js index 87d99eaba..691ad7685 100644 --- a/ext/wasm/api/extern-post-js.c-pp.js +++ b/ext/wasm/api/extern-post-js.c-pp.js @@ -45,14 +45,23 @@ const toExportForES6 = moduleScript: self?.document?.currentScript, isWorker: ('undefined' !== typeof WorkerGlobalScope), location: self.location, - urlParams: new URL(self.location.href).searchParams + urlParams: +//#if target=es6-bundler-friendly + undefined +//#else + new URL(self.location.href).searchParams +//#endif }); initModuleState.debugModule = - (new URL(self.location.href).searchParams).has('sqlite3.debugModule') +//#if target=es6-bundler-friendly + ()=>{} +//#else + (new URL(self.location.href).searchParams).has('sqlite3.debugModule') ? (...args)=>console.warn('sqlite3.debugModule:',...args) : ()=>{}; +//#endif - if(initModuleState.urlParams.has('sqlite3.dir')){ + if(initModuleState.urlParams && initModuleState.urlParams.has('sqlite3.dir')){ initModuleState.sqlite3Dir = initModuleState.urlParams.get('sqlite3.dir') +'/'; }else if(initModuleState.moduleScript){ const li = initModuleState.moduleScript.src.split('/'); |