Allow for browserslist environment variables#7764
Conversation
|
It looks like the build is now passing for other MRs, can someone please re-run CI on this MR? |
f6c587e to
55b7e53
Compare
Never mind, I just pushed an amended commit. |
|
@GreenGremlin We've had some problems with out CR, sorry that you had to push to get your PR (😉) to pass. |
mrmckeb
left a comment
There was a problem hiding this comment.
This looks good, can you share the documentation on this? I couldn't find it on their repo.
Unfortunately, just like |
mrmckeb
left a comment
There was a problem hiding this comment.
I had a look there, thanks! I've tagged this for the next minor.
|
It's interesting that we're setting this in our e2e tests. I imagine it must not be doing anything? create-react-app/tasks/e2e-kitchensink.sh Line 107 in ac93f31 |
The environment variables work for everything but the check for browserslist config that determines wether we should prompt to add it. Also, if the e2e tests are not run interactively, we may just skip the prompt entirely. |
|
Thanks @GreenGremlin! |
Browserslist allows for setting browserslist config using environment variables, but CRA still prompts for setting browserslist config when it is already configured for the environment.
For example, running this currently results in CRA improperly detecting that browserslist is not configured, even though it is.
BROWSERSLIST="> 5%" npm run build