Description
Checks
- Not a duplicate.
- Not a question, feature request, or anything other than a bug report directly related to Vue Splide. Use Discussions for these topics: https://github.com/Splidejs/splide/discussions
Version
0.6.12
Description
I recently just started getting the following type errors trying to build with the Vue version of splide:
app build: ../node_modules/.pnpm/@Splidejs+vue-splide@0.6.12/node_modules/@splidejs/vue-splide/src/js/components/SplideTrack/SplideTrack.vue(10,46): error TS1444: 'Ref' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled.
app build: ../node_modules/.pnpm/@Splidejs+vue-splide@0.6.12/node_modules/@splidejs/vue-splide/src/js/components/Splide/Splide.vue(12,10): error TS1444: 'ComponentConstructor' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled.
app build: ../node_modules/.pnpm/@Splidejs+vue-splide@0.6.12/node_modules/@splidejs/vue-splide/src/js/components/Splide/Splide.vue(12,32): error TS1444: 'Options' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled.
app build: ../node_modules/.pnpm/@Splidejs+vue-splide@0.6.12/node_modules/@splidejs/vue-splide/src/js/components/SplideTrack/SplideTrack.vue(12,1): error TS1371: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'.
app build: ../node_modules/.pnpm/@Splidejs+vue-splide@0.6.12/node_modules/@splidejs/vue-splide/src/js/components/Splide/Splide.vue(13,65): error TS1444: 'PropType' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled.
app build: ../node_modules/.pnpm/@Splidejs+vue-splide@0.6.12/node_modules/@splidejs/vue-splide/src/js/components/Splide/Splide.vue(13,84): error TS1444: 'Ref' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled.
app build: ../node_modules/.pnpm/@Splidejs+vue-splide@0.6.12/node_modules/@splidejs/vue-splide/src/js/constants/events.ts(29,3): error TS1444: 'EventMap' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled.
app build: ../node_modules/.pnpm/@Splidejs+vue-splide@0.6.12/node_modules/@splidejs/vue-splide/src/js/plugin/plugin.ts(1,1): error TS1371: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'.
app build: ../node_modules/.pnpm/@Splidejs+vue-splide@0.6.12/node_modules/@splidejs/vue-splide/src/js/plugin/plugin.ts(1,10): error TS1444: 'App' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled.
Reproduction Link
No response
Steps to Reproduce
- Make use of the the vue-splide components in a new vite vue typescript project
- Build the project
...
Expected Behaviour
The app builds normally without issue. I am wondering if you bump the main splide version from 4.1.3 to 4.1.4 if that may fix it since there was a type bug report recently reported for that here: Splidejs/splide#1003