umi 打包过后的体积实在太大怎么破? #8625
KaerElementye
started this conversation in
General
Replies: 5 comments 3 replies
-
或者有什么办法去除一些这个包里我没用到的东西吗? |
Beta Was this translation helpful? Give feedback.
0 replies
-
为什么会有typescript? |
Beta Was this translation helpful? Give feedback.
2 replies
-
给个复现 demo 看看。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
umi4 使用 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
刚开始没用chainWebpack,通过cross-env观察后做了拆包配置。
但是node_modules下的 typescript 的包的体积实在太大,单个包就有3M+,还有办法拆下或者压缩以及优化之类的吗?
chainWebpack 配置:
typescript: { name: "typescript", test: /[\\/]node_modules[\\/](typescript)[\\/]/, priority: -9, enforce: true, },
拆出来的dist/typescript文件还是很大.....
Beta Was this translation helpful? Give feedback.
All reactions