Creating a plugin using TypeScript #2502
-
Does anyone have experience using TypeScript to create a plugin for Tailwind? As far as I can tell, you have to compile the TS into JS, then use the JS version. Any way to use TS directly? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
As far as I know, you will have to compile to JS because of the following reasons:
So for now you will need to transpile it yourself. In the future we might be able to accept tailwind configs that are written in TypeScript directly, but then we need to transpile it. Either transpile it beforehand or at runtime using something like |
Beta Was this translation helpful? Give feedback.
-
You may also want to see previous discussion #2310 (comment) |
Beta Was this translation helpful? Give feedback.
As far as I know, you will have to compile to JS because of the following reasons:
So for now you will need to transpile it yourself. In the future we might be able to accept tailwind configs that are written in TypeScript directly, but then we need to transpile it. Either transpile it beforehand or at runtime using something like
ts-node
.