When building an electron project, it appears that some of the configuration prevents the app from running correctly. I'm not sure if I have configuration all wrong or what, but I tried with the default tutorial for electron and a minimal configuration to get parcel working, but have had no luck building an app that would work.
package.json is using cli, scripts look like this:
"scripts": {
"build": "parcel build index.html --public-url ./ --target electron",
"start": "electron ."
},
renderer.js should load, there should be no console errors in default build.
Getting a console error and renderer.js is unable to load.
Note in example repo, renderer.js is actually an empty file, but I'm guessing that shouldn't impact this.

It looks like the line that is failing is an HMR configuration, which can't be disabled for build, but shouldn't even be included?
Line where you can see HMR being loaded: https://github.com/JRJurman/electron-parcel-test/blob/master/dist/renderer.f84e1103.js#L1
In reality I'm trying to build a tutorial for building electron apps with my view-framework, that by-default uses parcel. The dummy repo proved that this appears to be happening in the most basic of scenarios.
I also noticed some issues when trying to load babel-polyfill, but I'll save that for after this... One issue at a time 馃槢
Repo (off of the electron-quick-start): https://github.com/JRJurman/electron-parcel-test
Commit Adding Parcel: https://github.com/JRJurman/electron-parcel-test/commit/69d0bb69de7f15820e517e42c23c622509423c5d
| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 1.12.3 |
| Node | 12.6.0 |
| npm/Yarn | npm 6.9.0 |
| Operating System | Windows 10 |
In the main.js file when you create the BrowserWindow try to add after the width and height :
webPreferences: {
nodeIntegration: true,
},
@ssoric hey, that worked! Glad that was an easy fix...
If there's an appropriate place in the repo to add this kind of documentation, I would be happy to add it, finding that and the --public-url ./ was kind of a challenge...
Otherwise feel free to close this issue! 馃槃
Most helpful comment
In the main.js file when you create the BrowserWindow try to add after the width and height :
webPreferences: {
nodeIntegration: true,
},