打包運行的時候出現以下錯誤
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/
原因是沒有設置webpack的模式是"生產環境"還是"開發環境",紅框是設置webpack為何種模式
通常情況:在package.json中設置
"scripts": { "dev": "webpack --mode development", "build": "webpack --mode production" },