How to import Echarts Baidu Map in my plugin?

Echarts is a opensource chart SDK,and has a extend with Baidu map.when i want to use it with baidu map extension in plugin, first i need init baidu map js as ?

i use import as follow:
import api from ‘http://api.map.baidu.com/api?v=2.0&ak=ZUONbpqGBsYGXNIYHicvbAbM’;

throw a CORS exception

Hi,

Can you install it thru npm instead and import the code in your javascript file?

Marcus