xieziyu / ngx-echarts

An angular (ver >= 2.x) directive for ECharts (ver >= 3.x)
https://xieziyu.github.io/ngx-echarts/
MIT License
1.11k stars 197 forks source link

After import chart by demand, package size seems to be as large as before #214

Closed KerryXuanWang closed 4 years ago

KerryXuanWang commented 4 years ago

Hello team,

As title described, i just import 'bar' and 'gauge' chart, and after build app, i use 'webpack-bundle-analyzer' to analyze the package size, echarts occupies a large part, almost 400KB after gzip. Do you have any suggestions?

Thanks a lot & Look forward to your reply.

xieziyu commented 4 years ago

@KerryXuanWang Did you import NgxEchartsCoreModule or NgxEchartsModule? Please refer to https://github.com/xieziyu/ngx-echarts#custom-build

KerryXuanWang commented 4 years ago

Yes, i do refer to the custom-build. And below is the import code. import { NgxEchartsCoreModule } from 'ngx-echarts/core'; Any other possibilities? Thanks!

xieziyu commented 4 years ago

Do you have any file that imports echarts? Do you use theme file?

KerryXuanWang commented 4 years ago

Sorry, it's my bad. If not on demand import, the gzip size is over 1MB(too large). Thanks for your time.