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

Webpack default mode not set to production #1678

Closed
tsonge opened this issue Jul 12, 2020 · 1 comment · Fixed by #1688
Closed

Webpack default mode not set to production #1678

tsonge opened this issue Jul 12, 2020 · 1 comment · Fixed by #1688
Projects

Comments

@tsonge
Copy link

tsonge commented Jul 12, 2020

Bug report

As stated in https://webpack.js.org/configuration/mode/, "If not set, webpack sets production as the default value for mode."

What is the current behavior?
argv does not contain mode property set to 'production', when invoking webpack without any mode set.

If the current behavior is a bug, please provide the steps to reproduce.
file webpack.config.js:

module.exports = (env, argv) => { console.log(argv); }

now run webpack, without setting any mode, and see that the argv object logged does not contain mode property set to 'production'.

What is the expected behavior?

argv object should have mode property set to 'production'.

Other relevant information:
webpack version: 4.43.0
Node.js version: 14.3.0
Operating System: Mac OSX 10.15.5
Additional tools: None

@alexander-akait alexander-akait transferred this issue from webpack/webpack Jul 13, 2020
@snitin315
Copy link
Member

@tsonge Thanks for reporting. I was able to reproduce. I will send a fix soon.

Screenshot at 2020-07-16 16-52-25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
GSoC 2021
  
Done (Phase 2)
Development

Successfully merging a pull request may close this issue.

2 participants