-
-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packaging succeeds despite Webpack compilation errors #579
Comments
ok great so that would be perfect.. when we package and create installers using electronforge we also have the source webpacked.. Right now, when I look at the contents of my app under Resources->app i get the node modules and the src files exactly as they were in my IDE.. we dont want this.. we want it all webpacked.. (it also does packaging and installers) |
@malept what do you imagine would be the ideal UI to show Webpack errors and warnings in development? Looking at plugin/webpack/src/WebpackPlugin.ts(283), where is const cb: webpack.ICompiler.Handler = (err, stats) => {
if (tab) {
tab.log(stats.toString({
colors: true,
}));
}
if (err) return onceReject(err);
onceResolve();
}; |
This is more of a question for @MarshallOfSound . |
@tgds WebPack compiler output is sent to a web logger, when you run |
I think (based on my understanding on the comments on this issue, which could be wrong - feel free to correct me) that this issue might have jumped the gun a bit, in thinking about how/what to log where from Webpack. For me, this biggest thing about this issue is firstly the fact that Secondly, it seems weird that you couldn't output a message saying "Failed to compile Main Process Code", as I have the following in my terminal:
Note how it says " Instead, what I get is In regards to what you said @tgds about the web-logger: For me this doesn't work - I get 404 errors when I navigate to that site, and it doesn't happen anyway when you're using A nice middleground for me in the interim would be if I've just spent a lot of time on this issue, having problems getting things to compile, as I can't actually see the problems typescript is having, since the output from Sorry if I've caused any confusion - I'd love to help to this sorted, so let me know if I should make any new issues or adjust my comments :) |
The webpack plugin can start and fail, leaving you with this Webpack Output Available: http://localhost:9000
Error launching app
Unable to find Electron app at /path/to/app
Cannot find module '/path/to/app' 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. |
…errors when packaging ISSUES CLOSED: #579
…errors when packaging ISSUES CLOSED: #579
thanks, @MarshallOfSound !! |
@MarshallOfSound should we make a separate issue to cover the situation highlighted by @jrobeson? In a nutshell: if something causes webpack-plugin to error out, we can't view the webpack logs as they're not written to file anywhere, and the log server is closed before it's accessible. |
@G-Rath Can you open a new issue specifically for getting webpack logs when the app quits / crashes / fails to start. Not sure what the solution would look like but would be good to track it |
One more question, if I may, @MarshallOfSound. Maybe it warrants discussion in a new issue, but how do you imagine strategy around using native modules and Webpack plugin? |
@tgds This was opened yesterday --> #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 |
@MarshallOfSound I've created #705 for this. I think my original issue might be have been fixed - I'm at work, so I can't really test everything, but if Either way, I still think it's a valid issue, and a good one to at least have tracked 😄 |
Please describe your issue:
If Webpack compilation has errors (e.g. due to typescript compilation), both
electron-forge start
andelectron-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
The text was updated successfully, but these errors were encountered: