mirror of
https://github.com/sqlite/sqlite.git
synced 2025-10-24 09:53:10 +03:00
Improve #if support in, and add #assert to, c-pp. Rename target=... preprocessor symbols to target:... because changes in the semantics for symbols which have an '=' makes some of those #if blocks mutually exclusive (which we won't want in rare cases involving the bundler-friendly builds).
FossilOrigin-Name: 54287487793d48f6dde919446ab7476aea0cc0aba3835c80f060a7b84221881a
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
At the time this is run, the global-scope sqlite3InitModule
|
||||
function will have just been defined.
|
||||
*/
|
||||
//#if target=es6-module
|
||||
//#if target:es6-module
|
||||
const toExportForESM =
|
||||
//#endif
|
||||
(function(){
|
||||
@@ -110,7 +110,7 @@ const toExportForESM =
|
||||
sIMS.scriptDir = src.join('/') + '/';
|
||||
}
|
||||
sIMS.debugModule('extern-post-js.c-pp.js sqlite3InitModuleState =',sIMS);
|
||||
//#ifnot target=es6-module
|
||||
//#ifnot target:es6-module
|
||||
// Emscripten does not inject these module-loader bits in ES6 module
|
||||
// builds and including them here breaks JS bundlers, so elide them
|
||||
// from ESM builds.
|
||||
@@ -126,10 +126,10 @@ const toExportForESM =
|
||||
}
|
||||
/* AMD modules get injected in a way we cannot override,
|
||||
so we can't handle those here. */
|
||||
//#endif // !target=es6-module
|
||||
//#endif // !target:es6-module
|
||||
return sIM;
|
||||
})();
|
||||
//#if target=es6-module
|
||||
//#if target:es6-module
|
||||
sqlite3InitModule = toExportForESM;
|
||||
export default sqlite3InitModule;
|
||||
//#endif
|
||||
|
||||
Reference in New Issue
Block a user