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

Razzle Environment variables all end up in the bundle #129

Closed
krazyjakee opened this issue Apr 5, 2018 · 3 comments
Closed

Razzle Environment variables all end up in the bundle #129

krazyjakee opened this issue Apr 5, 2018 · 3 comments

Comments

@krazyjakee
Copy link

Bug, Feature, or Question?

Bug

Current Behavior

process.env.RAZZLE_xxx environment variables are all compiled into the bundle despite not being called in isomorphic code.

Desired Behavior

Only add environment variable used in isomorphic code to the bundle.

Suggested Solutions

Sorry, but I don't understand razzle's environment variable logic well enough to suggest anything.

Additional Information


  • After.js Version: 1.3.0
  • Razzle Version: 2.0.0-alpha.7
  • React Version: 16.2.0
@jaredpalmer
Copy link
Owner

jaredpalmer commented Apr 6, 2018

This is a Razzle issue. There's discussion about Razzle runtime vars in the repo, let's go there with this.

@krazyjakee
Copy link
Author

Here if anyone is interested. jaredpalmer/razzle#528

@HamidTanhaei
Copy link

if anyone want to use .env variables in runtime, use this little package.
https://www.npmjs.com/package/razzle-plugin-runtimeenv

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

No branches or pull requests

3 participants