Open mingtianyihou33 opened 4 years ago
Translation of this issue:
2.13.2
macOS
3.0.0-beta.19
https://jsfiddle.net/mmx38qxw/
Introduce a component and look directly at the packaged bundle
package.json Module field should be added to export es module
"main": "lib/element- ui.common.js "。 There is no way to do tree shaping in this configuration, which leads to the introduction of some components, but the volume of the project after packaging is very large.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Element UI version
2.13.2
OS/Browsers version
macOS
Vue version
3.0.0-beta.19
Reproduction Link
https://jsfiddle.net/mmx38qxw/
Steps to reproduce
引入某个组件,直接看打包的bundle即可
What is Expected?
package.json 中应该添加module字段,导出es模块
What is actually happening?
"main": "lib/element-ui.common.js"。这个配置根本就没办法做tree shaking吧,这导致了引入部分组件,但是项目打包后体积很大。