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

Improve messages when bundle is compiling and done with compiling #164

Merged
merged 2 commits into from
Dec 23, 2016

Conversation

SpaceK33z
Copy link
Member

@SpaceK33z SpaceK33z commented Dec 23, 2016

What kind of change does this PR introduce?

Change, a small improvement in DX.

Did you add tests for your changes?

Yes

Summary

When the bundle is compiling, the console showed this:

webpack: bundle is now INVALID.

When it is done compiling, regardless of errors, it showed this:

webpack: bundle is now VALID.

This is very confusing, because most people think when it is "valid", that the bundle has successfully compiled. Also, when it says "bundle is now INVALID", people can think they have done something wrong.


This PR indents to clarify these messages;

When the bundle is compiling:

webpack: Compiling...

When the bundle is done compiling, but has errors:

webpack: Failed to compile.

When the bundle is done compiling, no errors:

webpack: Compiled successfully.

Note that if there are warnings, it will say "Compiled successfully." This is because a bundle with warnings will still work. I could add a special case for this, maybe "Compiled successfully, but with warnings." ?

Does this PR introduce a breaking change?

Not really, but I think there might be people who have hacked something based on these messages.

Other information

Inspired by this discussion on Twitter. The messages are also stolen from create-react-app.

cc @gaearon

@gaearon
Copy link

gaearon commented Dec 23, 2016

"Compiled with warnings" is a good wording IMO.

@SpaceK33z SpaceK33z merged commit 66af94d into master Dec 23, 2016
@SpaceK33z SpaceK33z deleted the actually-useful-bundle-messages branch December 23, 2016 23:52
@SpaceK33z
Copy link
Member Author

Thanks for the help here and on Twitter @gaearon!

@gaearon
Copy link

gaearon commented Dec 24, 2016

Thanks for caring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants