-
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/plugin-vue@5.0.4
| `-- vue@3.4.19 deduped
+-- echarts@5.5.0
+-- vue-echarts@6.6.9
| +-- echarts@5.5.0 deduped
| +-- vue-demi@0.13.11
| | `-- vue@3.4.19 deduped
| `-- vue@3.4.19 deduped
`-- vue@3.4.19
`-- @vue/server-renderer@3.4.19
`-- vue@3.4.19 deduped
Details
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.