Make possible to initialize SC_ATTR via REACT_APP_SC_ATTR env variable#2501
Merged
quantizor merged 6 commits intostyled-components:masterfrom Jun 4, 2019
Merged
Conversation
Contributor
|
Can you add this for the other env variable too? |
Contributor
Author
|
Sure! PR is updated. |
Contributor
|
@oliverlaz can you look into the CI failure? |
Contributor
Author
|
Hey @probablyup, Somehow this DISABLE_SPEEDY flag messes up the integration test. |
this increases the compatibility with CRA as it filters out any env variables which don't follow the REACT_APP_* pattern
…Y env variable this increases the compatibility with CRA as it filters out any env variables which don't follow the REACT_APP_* pattern
…LE_SPEEDY env variable" This reverts commit 861054e
911b25d to
a3519cd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When working with two or more different styled-components instances on a single page (or application),
SC_ATTRenvironment variable could be used for distinguishing between those instances.However, in create-react-app based applications, environment variables are filtered out by matching them with a well-known pattern (
REACT_APP_) -> see here.This PR enables usage of
REACT_APP_SC_ATTRenvironment variable as a fallback and its easier configuration via a.envfile.