微信小程序 echarts 文件过大怎么解决呢?

用的是最简单的柱状图,


正常使用echarts没问题,但由于文件过大,下载了自定义版本就会报错。。下载了好多版本都不行


        chart.clear()
        chart.setOption(option);

Cannot read property 'clear' of null
Cannot read property 'setOption' of null

用到是ec-canvas吗?
可考虑使用微信小程序的分包策略
https://developers.weixin.qq.com/miniprogram/dev/framework/subpackages/independent.html