vue-cli-plugin-electron-builder
See original GitHub issueHey there! I’m trying to use some Node.js modules in a Web Worker in an Electron app written in Vue. The problem is when I want to import or require those Node.js modules (including things like serialport
and stuff) I get an error and I can’t use any of them. I’ve read it here and there and I know it is something known, but I can’t really figure out what’s going on cause I have very little experience with both Electron and Webpack. By the way, any help will be really appreciated!
Used Vue plugin Github page: https://github.com/nklayman/vue-cli-plugin-electron-builder Link to another issue trying to explain this: #75
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
nklayman/vue-cli-plugin-electron-builder: Easily Build ... - GitHub
Open a terminal in the directory of your app created with Vue-CLI 3 or 4 (4 is recommended). Then, install and invoke the...
Read more >vue-cli-plugin-electron-builder - npm
Easily Build Your Vue.js App For Desktop With Electron. Latest version: 2.1.1, last published: 2 years ago.
Read more >Vue CLI Plugin Electron Builder
"VCP Electron Builder is a Vue CLI plugin for Electron with no required configuration. Write once, run everywhere – If it works as...
Read more >vue-cli-plugin-electron-builder 1.0.0-beta.3 vulnerabilities - Snyk
Learn more about known vue-cli-plugin-electron-builder 1.0.0-beta.3 vulnerabilities and licenses detected.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@MehrdadKhnzd - Here is a very nasty hack to make it work in Electron (since the native
require
method is always available whennodeIntegrationInWorker
is enabled):The whole point of this ‘hack’ is to trick Webpack into thinking you’re not actually using the
require
function, so it’ll stay away trying to ‘transpile’ your code… Its disguisting to use, but at least it works…for now.Thanks for the hack, @haroldiedema. This issue should be re-opened for sure, but the above does work.