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 2021/11/11 14:27:58 UTC

[GitHub] [echarts] pissang commented on issue #16054: Importing specific modules from CDN

pissang commented on issue #16054:
URL: https://github.com/apache/echarts/issues/16054#issuecomment-966346256


   Hi, I'm afraid we can only import [the whole bundle](https://cdn.jsdelivr.net/npm/echarts/dist/echarts.esm.js) in the browser now. 
   
   Importing ES module in the browser needs to have `.js` extension explictly. But we don't use `.js extension in our source code. If we importing modules from 'echarts/core', it will try to load other modules without giving `.js` extension and failed. 
   
   `import-map` seems to be a potential solution, but it don't have wildcard to match all the paths.
   
   I'm not sure if importing specific modules with hundreds of dependency files has the scenario rather than importing a single large bundled file.  If there is a scenario, I think we can plan to add '.js' extension to fix this issue in our `import` statements.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org