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

Enabled error details webpack #8391

Merged
merged 1 commit into from Oct 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/core/src/server/dev-server.js
Expand Up @@ -53,6 +53,7 @@ export default function(options) {
error.error = err;
error.close = true;
error.stats = stats;
stats.toJson(options.errorDetails);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the only change?

Could you please explain what exactly this does?

Copy link
Contributor Author

@dhuang612 dhuang612 Oct 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's enabling the option errorDetails through the function toJson.
So if the managerConfig has an error it will provide information about the error
https://webpack.js.org/api/node/#statstojsonoptions

Copy link
Member

@ndelangen ndelangen Oct 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does stats.toJson have side effects?
or does it mutate the given options.errorDetails
or does it mutate the stats object itself?
?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it mutates the given options.errorDetails

logger.line();
logger.line();
try {
Expand Down