As I got from the webpack cumbersome documentation here webpack -p will set
- --define process.env.NODE_ENV="'production'" for DefinePlugin
- --optimize-minimize flag that will include the TerserPlugin
As I got from the same documentation here webpack --mode=production will set
- --define process.env.NODE_ENV="'production'" for DefinePlugin
- TerserPlugin
- FlagDependencyUsagePlugin
- FlagIncludedChunksPlugin
- ModuleConcatenationPlugin
- NoEmitOnErrorsPlugin
- OccurrenceOrderPlugin
- SideEffectsFlagPlugin
(Bolded items are shared behaviour between the two different flags.)
Shall I consider --mode=production as a "full" version of -p? Some guides on the internet use -p, other use --mode=production and some even use both of them.
Also it would be great to know if --mode=production has any difference versus --mode production because for me both version work absolutely fine
Also, there is a thread here, that says that -p "Run commands in parallel." Is that a flag to node, that has the same name as -p for webpack?
I am using webpack ^4.41.2

