Is it possible to bundle used echarts features automatically? #753
kingyue737
started this conversation in
Ideas
Replies: 1 comment
-
You are right. As the import code can be only generated by the runtime |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I just saw the awesome new import code generator. Is it possible to bundle the necessary ECharts components and generate the correct option type via Vite plugin, which can improve DX?
It may also help split chunks since we usually import all ECharts components in a single module to reduce source code. But if we have two async routes in an SPA, one with a line chart and the other with a bar chart, both ECharts component will be loaded even if we only browse one route. With a bundler plugin, developers no longer need to worry about adding "echarts import code" per route to help split chunks but leave it to plugin or virtual module.
It may be difficult since
option
is an object which is dynamic. Wanna hear other thoughts about this.Beta Was this translation helpful? Give feedback.
All reactions