webpack4 在webpack-config.js 中 mode设置没有用

//webpack-config.js
const path = require('path'); module.exports = { mode: 'none', entry: './src/index.js', output: { filename: 'bundle.js', path: path.resolve(__dirname, '../dist') }       };

在package.json 中scripts 增加
"build": "webpack --mode production ./src/index.js --output ./dist/bundle.js"
"dev": "webpack --mode development ./src/index.js --output ./dist/bundle.js"
 
posted @ 2018-08-07 12:00  monica_guorong  阅读(2325)  评论(0编辑  收藏  举报