You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/04/02 07:53:02 UTC
[GitHub] [incubator-echarts] aesyondu commented on issue #8239: Webpack tree
shaking not working too well on echarts
aesyondu commented on issue #8239: Webpack tree shaking not working too well on echarts
URL: https://github.com/apache/incubator-echarts/issues/8239#issuecomment-607682428
Hi, did you follow the instruction on the docs?
https://echarts.apache.org/en/tutorial.html#Use%20ECharts%20with%20webpack
Went down from 2.5mb -> 1mb
<details>
<summary>
Before:
</summary>
```javascript
import echarts from "echarts"
```
<img width="935" alt="image" src="https://user-images.githubusercontent.com/57334943/78223412-677ac800-74f9-11ea-9044-4cd0434d7b06.png">
</details>
<details>
<summary>
After:
</summary>
```javascript
import echarts from 'echarts/lib/echarts'
import 'echarts/lib/chart/bar'
import 'echarts/lib/chart/line'
import 'echarts/lib/component/tooltip'
import 'echarts/lib/component/title'
```
<img width="779" alt="image" src="https://user-images.githubusercontent.com/57334943/78223504-909b5880-74f9-11ea-879a-926a24d41382.png">
</details>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org