rollup-plugin-typescript2
Not sure if it's a skill issue or something, but adding rollup-plugin-typescript2 seems to break types in Start, not sure if this should be supported but wondering if there's an out of the box way to add TS transformers like such?


9 Replies
rare-sapphire•11mo ago
what does this transformer do?
wise-whiteOP•11mo ago
It's used for react-intl. It's used to convert <Trans> component renders and inject an ID into them for internationalization
wise-whiteOP•11mo ago
rare-sapphire•11mo ago
does this work with vite alone?
e.g. router with automatic code splitting in vite
wise-whiteOP•11mo ago
Let me check when I get out of work, I didn’t try
This is my first personal Vite project
Following up on this. I guess I hadn't realized you can use Babel plugins in Vite. So I tried that in a barebones Vite project, and it worked. I imagine it should work for Start also?
rare-sapphire•11mo ago
I think so yes
let me know if it worked
wise-whiteOP•11mo ago
Babel works! 😄
rare-sapphire•11mo ago
can you post an example for anyone looking for this in the future ?
wise-whiteOP•11mo ago
Definitely will
In my case - I was using this for react-intl / formatjs, so this is how I configured
app.config.ts
to use their babel plugin: