Skip to content

Externalizing native dependencies doesn't seem to work with ElectronΒ #42

@rathboma

Description

@rathboma

Firstly, πŸ‘‹ @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions