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

可能的话还是再优化优化体积吧 #50

Open
cjd6568358 opened this issue Apr 17, 2019 · 7 comments
Open

可能的话还是再优化优化体积吧 #50

cjd6568358 opened this issue Apr 17, 2019 · 7 comments

Comments

@cjd6568358
Copy link

打包后的体积太大了,
没用之前
image
用了之后增加了400K
image

@cjd6568358
Copy link
Author

前端网页用,包太大了呃

@cjd6568358
Copy link
Author

image

@feichao93
Copy link
Owner

目前体积比较大的原因是 temme 依赖了 cheerio, cheerio 本身就有 320KB 左右的大小。

体积优化目前比较困难,暂时还没有好的方法 😌

@feichao93
Copy link
Owner

想到在网页端的可以使用 DOM 自带的解析工具来代替 cheerio,这样 temme 在网页端可以做到很小。不过这样会导致网页端和 node 端有不一致的情况,而且这个变更实现起来成本较高。

@cjd6568358
Copy link
Author

可以考虑出一个单独的构建版本

@cjd6568358
Copy link
Author

大佬,跪求更新一个浏览器版。。。

@feichao93
Copy link
Owner

@cjd6568358 不好意思,上班比较忙,我周末有空看看。

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

2 participants