vue-final / vue-final-modal

🍕Vue Final Modal is a tiny, renderless, mobile-friendly, feature-rich modal component for Vue.js.
https://vue-final-modal.org
MIT License
903 stars 97 forks source link

Add tsc-alias to dev dependencies. #380

Closed Offlein closed 1 year ago

Offlein commented 1 year ago

We recently upgraded to vfm 4.4.4.

In our latest version, our build process includes a failure because it cannot parse an alias in the Typescript definition:

tim-ui/node_modules/vue-final-modal/dist/components/CoreModal/CoreModalProps.d.ts(3,42): error TS2307: Cannot find module '~/Modal' or its corresponding type declarations.

I am not an expert on this but it appears to be because your CoreModalProps.ts file contains a reference with an alias in it (import type { ModalId, StyleValue } from '~/Modal'), but the vue-tsc build step does not extrapolate this for applications using this package as a dependencies.

This adds tsc-alias to parse those out. Maybe the vue-final team prefers to address this another way (or maybe this is a non-issue that is our error), but if not, this should fix the issue.

hunterliu1003 commented 1 year ago

@Offlein Thank you so much for your contribution!

It was merged and published in v4.4.5.