Incubator-echarts: 打包一个支持 ES6 import 的 build

Created on 16 Dec 2019  ·  8Comments  ·  Source: apache/incubator-echarts

What problem does this feature solve?

可以在较新的浏览器里使用import ECharts from './echarts.min'

What does the proposed API look like?

可以在较新的浏览器里使用import ECharts from './echarts.min'

enhancement

Most helpful comment

如果这是一个暂时无法解决的问题,是一个共性问题,那如你所说。但是如果这个很简单,你们能搞定,怎么就和你们没关系了呢,就像你们发布的默认是commonjs版本的一样,发布一个echarts.module.js就可以了。现在浏览器进步了,大家用各种构建工具做出来的东西,反而跟不上浏览器的进步?

All 8 comments

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to [email protected]. Please attach the issue link if it's a technical questions.

If you are interested in the project, you may also subscribe our mail list.

Have a nice day! 🍵

浏览器里直接使用

<script type="module">
import ECharts from './echarts.min'
</script>

引入?

嗯。

但是我没找到什么方式怎么判断浏览器是否支持了export/import……

This is not an issue directly related to ECharts. Please search for solutions elsewise.

如果这是一个暂时无法解决的问题,是一个共性问题,那如你所说。但是如果这个很简单,你们能搞定,怎么就和你们没关系了呢,就像你们发布的默认是commonjs版本的一样,发布一个echarts.module.js就可以了。现在浏览器进步了,大家用各种构建工具做出来的东西,反而跟不上浏览器的进步?

Please include a "echarts.module.js" or "echarts.mjs" in your dist folder, which can be imported as an ES6 module as stated above.
Highcharts is doing it since v6.1.0 April 2018!!!
https://github.com/highcharts/highcharts#load-highcharts-from-the-cdn-as-ecmascript-modules

Please @pissang or @Ovilia reopen!

Would be nice if this could fit into new Echart 5.0 stable!

Was this page helpful?
0 / 5 - 0 ratings