So, using sqldelight's js driver with the IR compi...
# javascript
d
So, using sqldelight's js driver with the IR compiler everything compiles fine but at runtime an Uncaught ReferenceError is throw because it can't find a
SqlJs
object which I believe is supposed to be bundled by webpack from the
sql.js
package. I've tried a handful of different custom webpack config changes but nothing seems to help.
I opened an issue in sqldelight (for now) here: https://github.com/cashapp/sqldelight/issues/2195 and my project config is all here: https://github.com/cuhacking/atlas/tree/js-search/common
t
Do you use
js
file from
build/distributions
?
d
I don't think it generates that folder
Ok I got it to generate the folder + the output js file, but the issue is still present there.
I updated my config to use
binaries.library()
instead since that's my actual use case, which I believe puts the "distribution" output in
build/developmentLibrary
(or release) right? In any case, the issue seems to be with the original bundled js, not specific to the output that I was using before.
t
1. I don’t understand why you need
binaries.library()
2. I don’t see
sql.js
declarations
d
I'm using the exported bundle as a dependency to a plain TypeScript/React app
The sql.js declarations would come from sqldelight
Figured out that it was an
@JsQualifier
issue
👍 1