-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Make possible to initialize SC_ATTR via REACT_APP_SC_ATTR env variable #2501
Make possible to initialize SC_ATTR via REACT_APP_SC_ATTR env variable #2501
Conversation
Can you add this for the other env variable too? |
Sure! PR is updated. |
@oliverlaz can you look into the CI failure? |
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
When working with two or more different styled-components instances on a single page (or application),
SC_ATTR
environment 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_ATTR
environment variable as a fallback and its easier configuration via a.env
file.