I am following the tutorial exactly as given here . But I am amazed that the docs seems outdated. e.g
npx webpack src/index.js dist/bundle.js fails with
npx webpack src/index.js dist/bundle.js
You can pass mode param in the webpack config or cli command.
mode
Config: mode: 'development' or mode: 'production'
mode: 'development'
mode: 'production'
CLI: webpack --mode development or webpack --mode production
webpack --mode development
webpack --mode production