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

Scripts: Allow non-production env in wp-scripts build #15480

merged 1 commit into from May 7, 2019


Copy link

commented May 7, 2019


As of today wp-scripts build enforces production env:

process.env.NODE_ENV = 'production';

It was never an intent to disallow other values, it was rather a side-effect of porting the existing functionality from Gutenberg :)


npm run build should work as before
NODE_ENV=development npm run build should run a single build in development mode

@gziolo gziolo self-assigned this May 7, 2019

@gziolo gziolo requested a review from sirreal May 7, 2019


sirreal approved these changes May 7, 2019

Copy link

left a comment

Much better, this allows you to produce an unminified build without needing to watch. Thanks!

Tested and confirmed:

  • npm run build - minified
  • NODE_ENV=development npm run build - not minified

@gziolo gziolo added this to the 5.7 (Gutenberg) milestone May 7, 2019

@gziolo gziolo merged commit 7f9d858 into master May 7, 2019

1 check passed

Travis CI - Pull Request Build Passed

@gziolo gziolo deleted the update/wp-scripts-build-env branch May 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.