-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Confirmation
- I can confirm this problem is not reproducible with ECharts itself.
How are you introducing Vue-ECharts into your project?
ES Module imports
Versions
+-- @vitejs/[email protected]
| `-- [email protected] deduped
+-- [email protected]
+-- [email protected]
| +-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| `-- [email protected] deduped
`-- [email protected]
`-- @vue/[email protected]
`-- [email protected] dedupedDetails
I found that ECharts v5.5.0 does not add files of ./types/dist/ to exports in package.json like following:
{
"exports":{
"./types/dist/shared":"./types/dist/shared.js",
}
}End users need to import types from echarts/types/dist/shared.js instead of echarts/types/dist/shared when moduleResolution is bundler in tsconfig (recommended by vite, default in create-vue and will become default in nuxt). Although it doesn't matter if users only use ECharts itself, users of Vue ECharts will meet broken types as Vue ECharts imports echarts/types/dist/shared instead of echarts/types/dist/shared.js in its output:

Or should I request it in ECharts Repo?
Reproduction
https://stackblitz.com/edit/vitejs-vite-svx9rd
In the repro, npm run typecheck should have printed error because I've set :update-options="{ bug: 'bug' }". But the type-check passed because update-options is any here.

