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