Replace rollup-plugin-dts
with @rollup/plugin-typescript
#500
JayaKrishnaNamburu
started this conversation in
General
Replies: 1 comment 1 reply
-
Hey @JayaKrishnaNamburu! 👋 I started using I checked if there is an easy way to prevent the inline |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, i see the types are being rolled up using
rollup-plugin-dts
tailwind-merge/scripts/rollup.config.mjs
Lines 74 to 89 in 206330e
The issue i am currently facing is, the package merges all the types exports into a single file. As you can see in
dist/types.d.ts
fileThe thing is the syntax of
type ClassNameValue
andtype ClassValidator
works only in typescript versions higher than4.3.0
. So, when using in an older projects. The typescript compiler is breaking because typescript versions lower than4.3
eg:4.2.4
seems to bundle the types insidenode_modules
too and it's breaking.Beta Was this translation helpful? Give feedback.
All reactions