-
Notifications
You must be signed in to change notification settings - Fork 620
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
引用整个echarts太大了,只需要几个chart类型 #57
Comments
同 #3,暂时没有想到比较好的方案,既能保证稳定性,又能保证兼容性。 个人想法是:
|
我发现,有很大的一个数据来自于地图的China.js或者world.js,如果有require |
China.js 或者 world.js 默认是没有加入到 echarts 的,需要自己手动引入。 |
可以用peerDependency的方法,让用户引入echarts,那样子就可以让用户自定义需要引入的地图类型了 |
理论上 echarts 确实是 peerDependency,package.json 也应该修改。 但是修改为 peerDependency 并不能解决打包太大的问题吧? |
@hustcc 其实我的意思是,你在项目里面直接引入了echarts啊,你可以不引入,然后让用户自己引入,所以就变成了:
这样子用户应该就可以自定义echarts的地图类型了 |
能够兼容现在的写法吗?比如用户不在乎 echarts 的大小,可以继续保持以前的写法。 |
@hustcc 我想想 然后提一份pr给你看看 |
v1.3.5 版本发布,支持自定义加载 echarts 模块,减少打包之后的 js 文件大小,感谢 @SidKwok |
我只需要用到里面其中几个echart,可不可以选择性的使用chart???
The text was updated successfully, but these errors were encountered: