apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.41k stars 19.61k forks source link

webpack主题无法按需引入 #7803

Closed mengxiong10 closed 4 years ago

mengxiong10 commented 6 years ago

webpack主题无法按需引入

[版本及环境]

代码

import echarts from 'echarts/lib/echarts'
import 'echarts/lib/chart/line'

import 'echarts/theme/macarons'

说明

由于theme文件夹下面主题文件require('echarts') 导致按需引入没用, 建议改成'echarts/lib/echarts', 下图:

image

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Dimitri-WEI-Lingfeng commented 3 years ago

这个问题还没解决吗 两年了

deltacat commented 3 years ago

同样的问题,一旦引入主题,按需引入的工作就全白干了。还是会全部打包。

plainheart commented 3 years ago

5567 5.3 会优化一下。