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

支持按模块加载吗 #1

Open
CowSmiles opened this issue Mar 22, 2017 · 1 comment
Open

支持按模块加载吗 #1

CowSmiles opened this issue Mar 22, 2017 · 1 comment

Comments

@CowSmiles
Copy link

多谢提供这个方便的库,支持echarts按模块加载吗,echarts太大了,如果整个加载,体积太大?
类似于这样的:
require('echarts/lib/chart/bar');

@xuqingkuang
Copy link
Owner

@klniu 可能不支持,因为 module 本身是个封闭的环境,从第二行就能看到它是把 ECharts 整个导入的,目前来看可能你只能裁剪一下 ECharts。

ECharts 如果未来能支持 Webpack 2 的 Tree Shaking 的话,其实会更好,这样用不到的方法都不会打包进去。

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