tailwindlabs / heroicons

A set of free MIT-licensed high-quality SVG icons for UI development.
https://heroicons.com
MIT License
21.22k stars 1.27k forks source link

Errors building with vue-tsc --noEmit #318

Closed zachad closed 3 years ago

zachad commented 3 years ago

I'm running into typescript errors on every single component when trying to build a project with vite and vue-tsc (using Vue3 and TypeScript):

Each component throws these two errors:

node_modules/@heroicons/vue/solid/AcademicCapIcon.d.ts(1,16): error TS2714: The expression of an export assignment must be an identifier or qualified name in an ambient context.
node_modules/@heroicons/vue/solid/AcademicCapIcon.d.ts(1,30): error TS2339: Property 'DefineComponent' does not exist on type 'Promise...

Running vite in dev mode works as expected. This only happens when running vue-tsc --noEmit.

Has anybody else run into this, or found a solution?

drevantonder commented 3 years ago

Yup, same when using vite and vue-tsc --noEmit. Works find in dev mode.

zmwangx commented 3 years ago

PR in #322.

bradlc commented 3 years ago

Thanks for reporting. Should be fixed in v1.0.4 👍