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 2022/03/01 13:55:40 UTC
[GitHub] [echarts] ElmoArmy opened a new issue #16599: [Feature] Support native ESM explicitly in package.json
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: 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
[GitHub] [echarts] ElmoArmy commented on issue #16599: [Feature] Support native ESM explicitly in package.json
Posted by GitBox <gi...@apache.org>.
ElmoArmy commented on issue #16599:
URL: https://github.com/apache/echarts/issues/16599#issuecomment-1055624824
The suggestion here would break cjs builds. Closing this as that is probably not a good idea....
I will come back with a PR to update the build process to create .mjs and .cjs files.
--
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
[GitHub] [echarts] ElmoArmy closed issue #16599: [Feature] Support native ESM explicitly in package.json
Posted by GitBox <gi...@apache.org>.
ElmoArmy closed issue #16599:
URL: https://github.com/apache/echarts/issues/16599
--
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