(1)安装两个依赖
npm i increase-memory-limit --save-dev
npm i cross-env --save-dev
(2)修改package.json的scripts,添加"fix-memroy-limit"
"scripts": {
"dev": "webpack-dev-server --disableHostCheck=true --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"lint": "eslint --ext .js,.vue src",
"build": "node build/build.js",
"fix-memroy-limit": "cross-env LIMIT=4096 increase-memory-limit"
},
(3)执行 npm run fix-memroy-limit