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

Webpack config with production flag #42

Open
chillichicken opened this issue Apr 25, 2017 · 0 comments
Open

Webpack config with production flag #42

chillichicken opened this issue Apr 25, 2017 · 0 comments

Comments

@chillichicken
Copy link

In your webpack.config.js it's better to also add the one liner here in the production section:

new webpack.DefinePlugin({
        'process.env': {
            NODE_ENV: JSON.stringify('production')
        }
    }),

Reasons are found here:

https://facebook.github.io/react/docs/optimizing-performance.html#use-the-production-build

Thanks for all your tutorials btw, I learned a lot !

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

1 participant