libsql-js
libsql-js copied to clipboard
Statically import libsql targets
I am not sure if there are more targets, but developing with bun using the single-file executable mode the libsql driver fails to be imported from the embedded file system as Bun doesn't detect what files are to be imported if done dynamically.
As the code dynamically imports the proper target module we can get a false positive if the built file is run in a project that has the node_modules/@libsql/*
target folders so it's recommended to test this by copying the binary file to another directory or simply running it from somewhere else:
e.g:
Image Error Transcript:
error: Cannot find module "@libsql/linux-x64-gnu" from "/$bunfs/root/test-build"
Oh, nice @msanchezdev! Does it mean we can drop the @neon-rs/load
dependency too?
@penberg I wasn't sure about neon, have to check how it works, but I am trying another approach now as this way it actually seems to be bundling all into the binary
Hey, there are any updates regarding this? It would be nice to drop the @neon-rs/load
dependency!