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
merged 1 commit into from
May 7, 2019

Conversation

gziolo
Copy link
Member

@gziolo gziolo commented May 7, 2019

Description

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 :)

Testing

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 08:54
@gziolo gziolo added [Package] Scripts /packages/scripts [Type] Bug An existing feature does not function as intended labels May 7, 2019
Copy link
Member

@sirreal sirreal left a comment

Choose a reason for hiding this comment

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

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
@gziolo gziolo deleted the update/wp-scripts-build-env branch May 7, 2019 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Scripts /packages/scripts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants