Home > Software engineering >  What benefits does development mode offer in webpack?
What benefits does development mode offer in webpack?

Time:09-17

I am using the command ...

webpack -w --mode development

but can not tell what benefits this adds. I'm assuming it adds debugging benefits over production mode but I can not tell that it is doing anything.

CodePudding user response:

It sets the process.env.NODE_ENV to the value that you can use afterwards in your code accordingly afterwards

More information available here: https://webpack.js.org/configuration/mode/

CodePudding user response:

You have access to sourcemaps (helps in debugging error), development server can be launched up which will restart everytime a file changes, no optimizations are done in development. moreover it's how we configure things for both modes

  • Related