threads-plugin
threads-plugin copied to clipboard
Externalizing native dependencies doesn't seem to work with Electron
Firstly, :wave: @andywer! Thank you so much for making Threads and threads-plugin. It's great.
I maintain https://github.com/beekeeper-studio/beekeeper-studio which is an electron app and I'm trying to add a web worker that uses better-sqlite3
.
I've enabled native module support in Electron, so it should work, but I'm getting this error, which seems to indicate that the better-sqlite3 module is not in the webpack externals list.
I'm providing it as an external to both the plugin, and to the main webpack config, so not sure if I'm doing something wrong (I probably am).
Here's a self contained project where I replicate the issue (see the console for the error): https://github.com/rathboma/bettersqlite3-electron-vue
Run with:
yarn install
yarn electron:start