-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundle project with sqlite3 dependency that uses prebuilt binaries #2830
Comments
This is in the “getting started” instructions for node (https://esbuild.github.io/getting-started/#bundling-for-node, copied below):
You can also mark individual packages as external if you want to do this on a case-by-case basis. |
Hello @evanw Thanks for your reply. I meant to ask if it is still possible to bundle those binaries without having them at runtime. Now I know that it is not possible and the only way is to exclude them. |
Hi there,
I encountered an issue when trying to bundle
sqlite3
dependencies. The prebuilt binary is located atnode_modules/sqlite3/lib/binding/napi-v6-darwin-unknown-x64/node_sqlite3.node
.In the runtime, the binary is loaded by
which fails in the bundled output js because the
__dirname
is not referring to the module dir anymore.the
package.json
in thesqlite3
module has specified the binary moduleWhat's the recommended way to bundle with prebuilt binaries like
sqlite3
?The text was updated successfully, but these errors were encountered: