vueuse / gesture

🕹 Vue Composables making your app interactive
https://gesture.vueuse.org
MIT License
362 stars 18 forks source link

build: use unbuild v2 to emit `.d.mts` files #25

Closed danielroe closed 8 months ago

danielroe commented 10 months ago

This bumps unbuild to v2 to emit .d.ts files so users using TypeScript bundler module resolution can get the types for this module.

Without this, the following error (for example) would be printed:

components/modal/ModalMediaPreviewCarousel.vue:2:30 - error TS7016: Could not find a declaration file for module '@vueuse/gesture'. '/Users/daniel/code/elk-zone/elk/node_modules/.pnpm/@vueuse+gesture@2.0.0-beta.1_vue@3.3.9/node_modules/@vueuse/gesture/dist/index.mjs' implicitly has an 'any' type.
  There are types at '/Users/daniel/code/elk-zone/elk/node_modules/@vueuse/gesture/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@vueuse/gesture' library may need to update its package.json or typings.

2 import type { Vector2 } from '@vueuse/gesture'