Skip to content
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

No way to see webpack logs from webpack-plugin if an error occurs while compiling #705

Open
G-Rath opened this issue Feb 26, 2019 · 0 comments
Assignees
Labels
enhancement help wanted plugin/webpack Issues or pull requests related to first-party webpack plugins/templates

Comments

@G-Rath
Copy link

G-Rath commented Feb 26, 2019

When using the webpack plugin, output is piped to a log server (usually at http://localhost:9000).

However, if an error occurs during complication that causes the process to end, the log server can't be accessed, as it's closed immediately.

A common example of where this can happen is with using TypeScript: If ts-loader can't compile the main process, it won't emit any files, causing electron to error out like so:

Webpack Output Available: http://localhost:9000


 App threw an error during load
Error: Module build failed (from ./node_modules/ts-loader/index.js):
Error: TypeScript emitted no output for C:\Users\G-Rath\workspace\projects-personal\my-project\src\main\index.ts.
    <stacktrace>
webpack built cd6a8a749879c7e98dc2 in 8086ms

(This error in particular does cause a dialog box from electron to open, which means the log server doesn't close until you hit ok, giving you a bit of a workaround, but it's still annoying and possible for other errors to just straight terminate the process)

It'd be nice for the webpack-plugin to somehow provide more information in these cases.

One possible solution could be to write the logs to disk (possibly via configuration, so that we could switch it on when if we're having such an error)


This is based off #579

@malept malept added the plugin/webpack Issues or pull requests related to first-party webpack plugins/templates label Jan 23, 2020
@erickzhao erickzhao self-assigned this Mar 2, 2022
dsanders11 pushed a commit that referenced this issue Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help wanted plugin/webpack Issues or pull requests related to first-party webpack plugins/templates
Projects
None yet
Development

No branches or pull requests

3 participants