Vite + TS: type errors during production build

1 Answer 107 Views
DropDownList Tooltip
Shashwat
Top achievements
Rank 1
Iron
Iron
Shashwat asked on 21 Apr 2022, 03:03 PM | edited on 21 Apr 2022, 03:11 PM

I am trying to setup a blank project using Vite and Vue 3 since Vite is suggested tooling for new Vue 3 projects.

I am getting type errors despite "skipLibCheck": true in the tsconfig.

Environment:

> node -v
v16.14.2

> pnpm -v
6.32.4

> pnpm tsc -v
Version 4.6.3

Reproduction steps:

  1. Checkout https://github.com/shashwatsingh/kendo-vite
  2. cd dropdown
  3. pnpm install
  4. pnpm dev # this works
  5. pnpm build # this fails

... more lines...

node_modules/.pnpm/@progress+kendo-vue-popup@3.2.4_d36bad9df0c973a5805fa10278317f29/node_modules/@progress/kendo-vue-popup/dist/npm/additionalTypes.ts:9:68 - error TS1205: Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'. 9 export { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type }; ~~~~~~~~ Found 6 errors in 3 files. Errors Files 2 node_modules/.pnpm/@progress+kendo-vue-common@3.2.4_d36bad9df0c973a5805fa10278317f29/node_modules/@progress/kendo-vue-common/dist/npm/additionalTypes.ts:9 2 node_modules/.pnpm/@progress+kendo-vue-dropdowns@3.2.4_4d853744181ba70ddba87c6a33341cef/node_modules/@progress/kendo-vue-dropdowns/dist/npm/additionalTypes.ts:9 2 node_modules/.pnpm/@progress+kendo-vue-popup@3.2.4_d36bad9df0c973a5805fa10278317f29/node_modules/@progress/kendo-vue-popup/dist/npm/additionalTypes.ts:9


Same steps, but tooltip folder in the repository root gives different errors:

node_modules/.pnpm/@progress+kendo-vue-tooltip@3.2.4_d36bad9df0c973a5805fa10278317f29/node_modules/@progress/kendo-vue-tooltip/dist/npm/additionalTypes.ts:9:10 - error TS1205: Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.

9 export { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type };
           ~~~~~~~~~~~~~~~
node_modules/.pnpm/@progress+kendo-vue-tooltip@3.2.4_d36bad9df0c973a5805fa10278317f29/node_modules/@progress/kendo-vue-tooltip/dist/npm/additionalTypes.ts:9:68 - error TS1205: Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.

9 export { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type };
                                                                     ~~~~~~~~
Found 2 errors in the same file, starting at: node_modules/.pnpm/@progress+kendo-vue-tooltip@3.2.4_d36bad9df0c973a5805fa10278317f29/node_modules/@progress/kendo-vue-tooltip/dist/npm/additionalTypes.ts:9

 

All this works in a vue cli project without issues. However, due to the size of our project, the build times are increasing. So we're looking at alternatives.

I have two questions:

  1. Is s something wrong in the above code? Am I using something unsupported?
  2. Does Kendo for Vue product suite support Vite?

1 Answer, 1 is accepted

Sort by
0
Accepted
Plamen
Telerik team
answered on 22 Apr 2022, 01:10 PM

Hello,

Thank you for getting in touch with us and for your concern with Kendo UI for Vue. 

I have inspected the example and it seems like a bug in the typescript of the components when using Node 16. I have logged it and it was fixed in version 3.2.5. Please give it a try and let us know if you still have issues.

As for the question at the end - yes the Native Kendo UI for Vue components support Vite. These are the component we are currently actively working on and adding more and more new components and functionalities with every release. If you observe any issue with them within Vite applications it will be treated as a bug and we will do our best to fix it as soon as possible. Just the components that are listed on this page below the 'Wrapper components ' line does not support Vite because they were based on our jQuery widgets.

If you observe any other issue or have more questions please don't hesitate to contact us again.

Regards,
Plamen
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Shashwat
Top achievements
Rank 1
Iron
Iron
commented on 26 Apr 2022, 01:57 PM

Thanks, upgraded to the latest versions and I'm able to build.
Plamen
Telerik team
commented on 26 Apr 2022, 02:07 PM

Thank you for confirming the scenario is now working correctly. Any further feedback is more than welcomed. 
Tags
DropDownList Tooltip
Asked by
Shashwat
Top achievements
Rank 1
Iron
Iron
Answers by
Plamen
Telerik team
Share this question
or