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

Define node environment constant in Webpack configuration #755

Merged
merged 1 commit into from
May 10, 2017

Conversation

aduth
Copy link
Member

@aduth aduth commented May 10, 2017

This pull request seeks to resolve a warning which is logged to the console when visiting the Gutenberg editor using the production build:

You are currently using minified code outside of NODE_ENV === 'production'. This means that you are running a slower development build of Redux. You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) to ensure you have the correct code for your production build.

Testing instructions:

  1. Run npm run build
  2. Visit the Gutenberg screen
  3. Verify no warnings or errors are logged to the browser developer tools console

Caveats:

You may find different warnings are logged if you have a SCRIPT_DEBUG active. This is expected, and we should discourage mismatched environments (production built editor script, debug script constant).

@aduth aduth added the [Type] Build Tooling Issues or PRs related to build tooling label May 10, 2017
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants