pissang edited a comment 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 it exits, I think we can plan to add '.js' extension in our `import` statements to fix this issue. But after this change, we may still need `import-map` to resolve the zrender dependency from npm @plainheart We put our esm modules in the `lib` folder now -- 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-unsubscr...@echarts.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org