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

打包之后的文件太大 #3598

Closed
liuqing007 opened this issue Feb 25, 2019 · 9 comments
Closed

打包之后的文件太大 #3598

liuqing007 opened this issue Feb 25, 2019 · 9 comments

Comments

@liuqing007
Copy link

1、npm run build之后的文件太大
ant design pro 2.1.1打包之后,单单umi.js就1.5M,vendors.async更是快3M,请问有什么办法可以尽量压缩到1M以内么?
2、应用版本更新问题
生产环境用的nginx,打包之后文件发布到nginx(nginx关闭缓存)之后。如果应用有新的更新。打包后的文件覆盖之前发布的文件。刷新页面还是老的页面。除非清除浏览器缓存才起作用

@liuqing007
Copy link
Author

qq 20190225162848
附npm run analyze的结果

@vellengs
Copy link
Contributor

vellengs commented Feb 25, 2019

gzip 了吗?发布到 nginx (nginx 启用了Gzip)

@liuqing007
Copy link
Author

gzip 了吗?发布到 nginx (nginx 启用了Gzip)

启用了,启用之后,vendors.async+umi.js也有1M多

@chenshuai2144
Copy link
Collaborator

chenshuai2144 commented Feb 27, 2019

可以试试我们最新的代码。bizichart 就很昂贵、
#3542

@liuqing007
Copy link
Author

问题始终没有解决,看样子这东西用的人不多。。

@Topgt
Copy link

Topgt commented Jun 6, 2019

官网示例umi.js才400k,直接build master分支后的umi.js 1M多,这是什么情况啊,图片,图片

这个问题有解决方案吗,这东西要是1M多没发上线啊

@chenshuai2144
Copy link
Collaborator

官方的 umi 开了 gzip 。gzip可以减少 百分90 的大小

@jinyu73
Copy link

jinyu73 commented Jul 22, 2021

新公司项目,打包后文件54M。。。。。。

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

6 participants