forge
forge copied to clipboard
typescript+webpack template presents a blank app window when debugging in vscode under Windows 10
Pre-flight checklist
- [X] I have read the contribution documentation for this project.
- [X] I agree to follow the code of conduct that this project uses.
- [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.
Electron Forge version
6.0.0-beta.63
Electron version
v16.0.7
Operating system
Windows 10
Last known working Electron Forge version
unknown
Expected behavior
Electron app starts and renders as it normally would if running '.\node_modules.bin\electron-forge start' from the command line.
Actual behavior
Electron app present a blank window.
Steps to reproduce
- Create the application using the typescript+webpack template.
- Open the application folder using vscode (using vscode version 1.63.2 in this case).
- Create a debugging launch profile as per Debugging with VS Code.
- Launch the debugger through vscode.
Additional information
After much trial and error, found that removing the fork-ts-checker-webpack-plugin plugin resolves the issue. Tried the latest fork-ts-checker-webpack-plugin (6.5.0) and ts-loader (9.2.6) npm packages to no avail.
Have been using it under Linux for a while now and have never had this issue. When I tried building and debugging my actual application, which is originally based off the typescript+webpack template, under Windows 10 I discovered this issue, and troubleshooting led me to pulling it apart and stripping it down.
Unsure whether this is an integration issue with electron-forge/fork-ts-checker-webpack-plugin, or an issue with the fork-ts-checker-webpack-plugin itself.
Would welcome a better workaround than removing fork-ts-checker-webpack-plugin if anyone knows what the actual issue is.
Also experienced this in Windows 10 using the typescript+weback template
Minimal repro for this, created with npx create-electron-app ... --template=typescript-webpack
https://github.com/RandomEngy/electron-forge-webpack-ts-debugging
I can confirm, that removing 'fork-ts-checker-webpack-plugin' solves issue. Any idea why ? There is no error in log / debug messages.
Having the exact same behavior here.
FYI here I show the launch.json file I use for debugging:
- https://github.com/electron/forge/issues/2789#issuecomment-1320963413