项目中,当组件文件过多,webpack-dev-server 编译时,容易内存溢出,
在 \node_modules\.bin\webpack-dev-server.cmd 加以下红色配置,暂可解决
@IF EXIST "%~dp0\node.exe" ( "%~dp0\node.exe" "--max_old_space_size=4096" "%~dp0\..\_webpack-dev-server@2.11.3@webpack-dev-server\bin\webpack-dev-server.js" %* ) ELSE ( @SETLOCAL @SET PATHEXT=%PATHEXT:;.JS;=;% node "--max_old_space_size=4096" "%~dp0\..\_webpack-dev-server@2.11.3@webpack-dev-server\bin\webpack-dev-server.js" %* ) 注意空格 和 双引号