因为我的命令写错了
不是webpack --mode = development
E:\leing\gui\1010\webpackdemo>webpack --mode = development
[webpack-cli] Invalid value '=' for the '--mode' option
[webpack-cli] Expected: 'development | production | none'
而是webpack --mode=development
E:\learng\goli\1010\webpackdemo>webpack --mode=development
asset bundle.js 2.9 KiB [emitted] (name: main)
./src/main.js 107 bytes [built] [code generated]
./src/common.js 56 bytes [built] [code generated]
./src/utils.js 46 bytes [built] [code generated]
webpack 5.91.0 compiled successfully in 72 ms
等号两边都没有空格!!