Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

内存溢出 #24

Open
zy19940510 opened this issue Jun 1, 2018 · 5 comments
Open

内存溢出 #24

zy19940510 opened this issue Jun 1, 2018 · 5 comments

Comments

@zy19940510
Copy link

好像项目大了之后,webpack编译会有内存溢出问题

@javaLuo
Copy link
Owner

javaLuo commented Jun 1, 2018

额 没遇到过哦,项目得有多大..

@zhans1993
Copy link

我这边也出现了

@javaLuo
Copy link
Owner

javaLuo commented Apr 18, 2019

可以试试把webpack.dev.config.js中的devtool字段改为: "cheap-eval-source-map"
这个开销会小一些。
还有一个办法是package.json中的start命令改成这样:

"start": "node server.js --max_old_space_size=4096",

我也是在网上查的。不知道你们是不是在热更新时遇到的这问题。
我也曾遇到过几次,但一直没在意。

@zhans1993
Copy link

多次尝试 dll 就内存溢出了,是我第三方库引用太多了?

@javaLuo
Copy link
Owner

javaLuo commented Apr 23, 2019

要不只把react/react-dom/antd编译成dll,
其他较小的库就没必要了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants