ElmoArmy opened a new issue #16599:
URL: https://github.com/apache/echarts/issues/16599
### What problem does this feature solve?
Looks like the space and standards are moving towards ESM, it'd be cool if
this library embraced that by switching to a package.json that embraces the
latest best practices in multi-format support.
See:
Additional context about this issue:
- https://v3.nuxtjs.org/concepts/esm/#what-kinds-of-problems-can-there-be
- antfu/vite-ssg#201
### What does the proposed API look like?
`package.json` would include the `type` and `exports` options:
```json
"type": "module",
"exports": {
".": {
"require": "./dist/echarts.js",
"import": "./dist/echarts.esm.js",
"types": "./index.d.ts"
},
"./core": {
"import": "./core.js",
"types": "./core.d.ts"
},
"./renderers": {
"import": "./renderers.js",
"types": "./renderers.d.ts"
},
"./charts": {
"import": "./charts.js",
"types": "./charts.d.ts"
},
"./components": {
"import": "./components.js",
"types": "./components.d.ts"
},
"./features": {
"import": "./features.js",
"types": "./features.d.ts"
}
},
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]