-
Notifications
You must be signed in to change notification settings - Fork 19.8k
Closed
Labels
enThis issue is in EnglishThis issue is in Englishnew-featurependingWe are not sure about whether this is a bug/new feature.We are not sure about whether this is a bug/new feature.
Description
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
- ERR_MODULE_NOT_FOUND : echarts\core only during SSG Build antfu-collective/vite-ssg#201
What does the proposed API look like?
package.json would include the type and exports options:
"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"
}
},Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enThis issue is in EnglishThis issue is in Englishnew-featurependingWe are not sure about whether this is a bug/new feature.We are not sure about whether this is a bug/new feature.