Packaging succeeds despite Webpack compilation errors
See original GitHub issue- [ x] I have read the contribution documentation for this project.
- [x ] I agree to follow the code of conduct that this project follows, as appropriate.
- [x ] I have searched the issue tracker for an issue that matches the one I want to file, without success.
Please describe your issue:
If Webpack compilation has errors (e.g. due to typescript compilation), both electron-forge start
and electron-forge package
scripts succeed without any warnings.
In case of electron-forge package
, no files are emitted as noEmitOnErrors plugin is set up.
The command should fail and display the errors.
For electron-forge start
, files are emitted as they should be, but the webpack compilation errors should be displayed.
Here’s a repo with the setup: https://github.com/tgds/electrong-forge-webpack-typescript
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (9 by maintainers)
Top Results From Across the Web
Packaging succeeds despite Webpack compilation errors #579
If Webpack compilation has errors (e.g. due to typescript compilation), both electron-forge start and electron-forge package scripts succeed ...
Read more >How I solved and debugged my Webpack issue through trial ...
When webpack bundles your source code, it can become difficult to track down errors and warnings to their original location.
Read more >Webpack resolve compiles, but errors in the browser
I added resolve to my webpack.config and it was fine. Webpack compiled and everything is gravy, until I load the browser, where I...
Read more >Troubleshooting - SurviveJS
Using webpack can lead to a variety of runtime warnings or errors. Often a particular part of the build fails for a reason...
Read more >Compiler Hooks | webpack
This hook allows you to do a one more additional pass of the build. failed. SyncHook. Called if the compilation fails. Callback Parameters:...
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
@tgds This was opened yesterday --> https://github.com/electron-userland/electron-forge/issues/703
I hacked a bit on it last night, it’s a tough one to solve, I think I’m on a track to a generic enough hack though that might work 😆
It’s tough to solve without
externals
(and I really want to avoid usingexternals
as it defeats the purpose of bundling all JS)The webpack plugin can start and fail, leaving you with this
and by the time you get there, the http server has already closed itself out, so you don’t even know if you’re say… missing ts-loader. I couldn’t get my app to start, because I didn’t know enough about webpack to know I needed it. I had to use @tgds’s example repo to find out.
NOTE: I’m only using webpack at all because electron-compile seems unmaintained.