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

Setup without warnings (defaults to production mode) #1560

Closed
1 of 2 tasks
andreasnilssondev opened this issue Nov 5, 2018 · 3 comments · Fixed by #1653
Closed
1 of 2 tasks

Setup without warnings (defaults to production mode) #1560

andreasnilssondev opened this issue Nov 5, 2018 · 3 comments · Fixed by #1653

Comments

@andreasnilssondev
Copy link

  • Operating System: Windows 10
  • Node Version: 8.9.0
  • NPM Version: 6.1.0
  • webpack Version: 4.24.0
  • webpack-dev-server Version: 3.1.10
  • This is a bug
  • This is a modification request

Expected Behavior

When following the setup instructions in the readme I want to have webpack-dev-server running without any warnings or errors.

Actual Behavior

I end up with a warning because webpack-dev-server is in production mode.

WARNING in configuration The 'mode' option has not been set, webpack will fallback to 'production' for this value.

Please note that in readme it says: "This should be used for development only."

For Features; What is the motivation and/or use-case for the feature?

I would love one of the following:

  • change the readme instructions to include the --mode=development. Instead of letting people get a warning because of incorrect setup, and have to figure out a solution themselves (not obvious to everyone that webpack-dev-server takes the same flags as webpack).

  • This was already rejected, but I think it's highly related and deserves to be an option, so please see this as very respectfully and carefully mentioned: Revisit Default mode to development? #1327 (Default mode to development?), read the comments, and consider the number of 👍 vs 👎 and see if maybe it's reasonable to reconsider this request. If not, could we please have a slightly more detailed explanation to help us understand the issues? You never know, maybe someone has a different idea that would work for everyone. But to get there, they need to know the problem.

And of course either way: Thank you for a great plugin, only getting better!

@alexander-akait
Copy link
Member

@nAndreas Feel free to send a PR

@andreasnilssondev
Copy link
Author

andreasnilssondev commented Nov 7, 2018

Thank you @evilebottnawi

Just to be sure, do you want the documentation update or setting development by default? 😃

@alexander-akait
Copy link
Member

@nAndreas based on user experience, we need implement development by default (don't forget respect mode from configuration)

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

Successfully merging a pull request may close this issue.

2 participants