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

fix definition of webpack -p #1349

Merged
merged 1 commit into from
Jun 29, 2017
Merged

fix definition of webpack -p #1349

merged 1 commit into from
Jun 29, 2017

Conversation

JonnieCache
Copy link
Contributor

@JonnieCache JonnieCache commented Jun 28, 2017

fix definition of webpack -p command line option expansion, at the top of this page its missing the needed single quotes which are present down below. this caused me some grief ;)

incidentally --optimize-minimize --define process.env.NODE_ENV="'production'" doesnt produce the same result as -p for me, only the first correctly causes react to build in production mode without the attedent warnings. this is with webpack 1.15.0 and react 15.6.1. I assume this is a doc issue rather than something i need to create as an issue on either react or webpack but let me know if im wrong here.

fix definition of `webpack -p` command line option expansion, at the top of this page its missing the needed single quotes which are present down below. this caused me some grief ;)

incidentally `--optimize-minimize --define process.env.NODE_ENV="'production'"` *doesnt* produce the same result as `-p` for me, only the first correctly causes react to build in production mode without the attedant warnings. this is with webpack 1.15.0 and react 15.6.1. I assume this is a doc issue rather than something i need to create as an issue on either react or webpack but let me know if im wrong here.
@jsf-clabot
Copy link

jsf-clabot commented Jun 28, 2017

CLA assistant check
All committers have signed the CLA.

@skipjack
Copy link
Collaborator

Hmmm well I think you are correct that the quotes are needed but will let @bebraw have the final say. Also, just as a general note, this repo is geared towards the latest major releases of webpack, i.e. v2 and v3. While I believe you're correction still stands, you should migrate to a newer version as soon as you can. There are a variety of other things documented on this site that will not work in 1.x.x versions.

@bebraw
Copy link
Contributor

bebraw commented Jun 29, 2017

Yup, better go with quotes I think. That said, I don't use the CLI myself but the fix looks valid.

@skipjack skipjack merged commit 03e8a5d into webpack:master Jun 29, 2017
@skipjack
Copy link
Collaborator

@JonnieCache merged, but please see my comment above as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants