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

Flags for webpack debug and production mode #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Flags for webpack debug and production mode #4

wants to merge 1 commit into from

Conversation

mfellner
Copy link

Resolves #3

  • -f debug passes the -d (development) flag to webpack.
  • -f production passes the -p (production) flag to webpack and sets the NODE_ENV variable to "production" when running the webpack subprocess.

@singingwolfboy
Copy link
Member

Hi there, I'm sorry it's taken so long for anyone to look at this. One question: it looks like the -d flag in webpack is just a shortcut for --debug --devtool sourcemap --output-pathinfo, and the -p flag is just a shortcut for --optimize-minimize. Can we use those full flags, instead? It makes it clearer what these flags are supposed to actually be doing.

I've also just added automated tests to this project in #5. Can you rebase your change on top, and add tests for this change?

@mfellner
Copy link
Author

mfellner commented Jan 5, 2017

Sorry too, @singingwolfboy, I didn't see your reply any earlier. I think passing the verbose options instead of the shortcuts is a good idea to make things clearer.

For better or worse, webpack might change the flags that are lumped together behind each shortcut however. Currently the documentation says this:

shortcut options
-d --debug --devtool eval-cheap-module-source-map --output-pathinfo
-p --optimize-minimize --define,process.env.NODE_ENV="production" --optimize-occurence-order

I'll have to check if both webpack v1 and v2 support all those options first (I think they do).

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

Successfully merging this pull request may close these issues.

None yet

2 participants