Hi all. Trying to use SqlDelight on a KMP library ...
# squarelibraries
x
Hi all. Trying to use SqlDelight on a KMP library module, (which also targets
js(IR)
). I’m making use of the npm-publish plugin to export my KMP library locally to npm, so that i can
link
these kotlin-js artefacts from pure js projects. However, when I invoke
initSqlDriver()
from jsMain, i get this on the console
Copy code
wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
failed to asynchronously prepare wasm: CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 44 4f @+0
Has anyone encountered this before?
1
In the documentation it mention
If building for browsers, some additional webpack configuration is also required.
with some js code. Looking at the samples they are defined in the root directory. However, when bundled thorough npm-publish. these
wasm.js
and
fs.js
are not included. Im wondering if that is the issue