diff options
author | stephan <stephan@noemail.net> | 2022-11-19 02:58:03 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-11-19 02:58:03 +0000 |
commit | c768ef7289c747b5f487319503d9150ef97bfc13 (patch) | |
tree | 69f45352000825e21c5ae74400e601e0ff6b3325 /ext/wasm/api/extern-post-js.js | |
parent | 85728a21c63e8feb1c13d2cf81962bd34b023a08 (diff) | |
parent | f7d98ac7649f6b0ad5cd0597e02e0fd96df437dc (diff) | |
download | sqlite-c768ef7289c747b5f487319503d9150ef97bfc13.tar.gz sqlite-c768ef7289c747b5f487319503d9150ef97bfc13.zip |
Integrate a custom preprocessor to the JS build process to facilitate creation of both vanilla JS and ES6 Module builds from the same source files. There is still some build-level reworking pending to make an ESM build a first-class deliverable.
FossilOrigin-Name: 10c723d96d61d2e552ec1102563d58f1eb11bc3d30e03606fd8e0279c5a9043a
Diffstat (limited to 'ext/wasm/api/extern-post-js.js')
-rw-r--r-- | ext/wasm/api/extern-post-js.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/wasm/api/extern-post-js.js b/ext/wasm/api/extern-post-js.js index d933a3626..fe9e4392b 100644 --- a/ext/wasm/api/extern-post-js.js +++ b/ext/wasm/api/extern-post-js.js @@ -4,6 +4,9 @@ most of the associated JS code, runs outside of the Emscripten-generated module init scope, in the current global scope. */ +//#if SQLITE_JS_ESM +const toexport = +//#endif (function(){ /** In order to hide the sqlite3InitModule()'s resulting Emscripten @@ -103,4 +106,10 @@ exports["sqlite3InitModule"] = sqlite3InitModule; /* AMD modules get injected in a way we cannot override, so we can't handle those here. */ +//#if SQLITE_JS_ESM + return self.sqlite3InitModule; +//#endif })(); +//#if SQLITE_JS_ESM +export default toexport; +//#endif |