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

webpack 压缩打包时卡死求解 #14

Closed
285858315 opened this issue Aug 26, 2016 · 5 comments
Closed

webpack 压缩打包时卡死求解 #14

285858315 opened this issue Aug 26, 2016 · 5 comments

Comments

@285858315
Copy link

webpack 压缩打包时卡死求解,不知道有人遇到过没?不压缩可以正常用。

@285858315
Copy link
Author

顺便请教下,webpack 在压缩时可以指定部分不压缩么?这样应该也能解决这个问题。

@dxq613
Copy link
Member

dxq613 commented Aug 26, 2016

不太了解webpack的打包,@jaredleechn 帮忙回答一下

@jaredleechn
Copy link

jaredleechn commented Aug 26, 2016

  • 本地试了下,g2 的压缩版本作为依赖打包没有问题,压缩确实会占用较久时间,猜测你不是卡死而是过慢
  • 可以用 external 把 g2 挂在全局上
  • 可以配置 uglifyjsplugin
  • 可以配置 noParse

如果觉得自己写 webpackConfig 太麻烦可以使用 atool-build

@285858315
Copy link
Author

确实是慢,中午吃完饭回来发现居然打包完成了,平时也不会等这么久。

@285858315
Copy link
Author

多谢指点。

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