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

Tell user what browser support their application was built with #3782

Merged
merged 2 commits into from
Jan 14, 2018

Conversation

Timer
Copy link
Contributor

@Timer Timer commented Jan 14, 2018

This PR warns about specifying browsers with a method other than package.json after build.

This PR also prevents build/start when no browsers are specified.

TODO:

  • provide a link to docs about specifying browsers
  • interactive prompt (Y/n) to set defaults in package.json (?)

Fixes #3779

return {
error: false,
message: chalk.yellow(
'$BROWSERSLIST was specified in your environment. ' +
Copy link
Contributor

@gaearon gaearon Jan 14, 2018

Choose a reason for hiding this comment

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

I'm not feeling great about being patronizing here.

If we decided to use browserlist then IMO we should embrace however they're doing it. I think our tone should be more like

"Built the bundle with support for (list of browsers) because (where we read the list)"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we care about where the configuration comes from, or just to display what configuration was used?

Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice to display both. But if that requires reimplementing half of browserlist maybe we can just show the config used, and file an issue with them asking to expose the source info.

@Timer Timer changed the title Warn about non-recommended browsers Tell user what browser support their application was built with Jan 14, 2018
@Timer
Copy link
Contributor Author

Timer commented Jan 14, 2018

This is good enough for an alpha.

@Timer Timer merged commit d73a952 into facebook:next Jan 14, 2018
@Timer Timer deleted the warn-browsers branch January 14, 2018 17:04
gaearon pushed a commit that referenced this pull request Jan 14, 2018
* Warn about browsers during build

* Better message
Timer added a commit to Timer/create-react-app that referenced this pull request Jan 15, 2018
akstuhl pushed a commit to akstuhl/create-react-app that referenced this pull request Mar 15, 2018
zmitry pushed a commit to zmitry/create-react-app that referenced this pull request Sep 30, 2018
@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants