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

Activate systemvars to load all system and react .env variables #21

Merged
merged 1 commit into from
Nov 18, 2019

Conversation

sidati
Copy link
Contributor

@sidati sidati commented Oct 31, 2019

This tweak made exploitation of variable such as process.env.npm_package_version and any env variable in CRA's .env files possible.

This tweak made exploitation of variable such as `process.env.npm_package_version` and any env variable in CRA's .env files possible
@sidati
Copy link
Contributor Author

sidati commented Oct 31, 2019

In my case i need to use my package version to perform some conditional actions, and since the cra-append-sw does not have access to process.env.npm_package_version i cannot do that and i have to change the version in both package.json file and my custom servicesWorker.js.

And why doing that while create-react-app is using dotenv-expand react-scripts/config/env.js#L43, so we can take advantage of all the env variables 😁

@chrislim
Copy link

I would benefit from this PR too.

@tszarzynski tszarzynski merged commit 60495b1 into tszarzynski:master Nov 18, 2019
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.

3 participants