Open benoitlahoz opened 3 years ago
I'm having a similar issue and have made a sample project to replicate it using better-sqlite3
:
https://github.com/rathboma/bettersqlite3-electron-vue
I believe I need to add better-sqlite3
to the webpack externals for the threads build. Is there a way to tell if it's doing that, or a way to force it?
Hello and thank you for the great work!
I'm building an app in Typescript with Electron (electron-builder) and Vue.js
The plugin seems to be ok, as it bundles my worker correctly.
Then, in the worker, I try to import 'is-online' module, that works great in the main thread but gives a Can't resolve 'dgram' in... in the worker (so... error happens when the module imports a submodule), and tried 'is-reachable' module giving this time Can't resolve 'dns'.
When importing directly the 'dns' module I have the same error.
FYI, nodeIntegration is set to false in Electron, sandbox to true, contextIsolation to true. But, I thought that, as I'm running the worker from the main process, it wouldn't be an issue.
I've read about babel '@preset/env' configuration, but for the time being it doesn't change anything. Am I missing something?
Thank you!