KonstantinSimeonov / tsx-control-statements

Control flow JSX/TSX elements that get compiled to plain old javascript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Integration with NuxtJS

juanfernandoe opened this issue · comments

Hi,

First of all, thank you for this amazing work.

Any idea how to integrate this with NutxJs + Typescript ?

Hi, I've never used nuxt, but from I've read on their docs page, you can go one of two ways:

  • Hook a typescript loader such as ts-loader or awesome-typescript-loader into nuxt build config and hook tsx-control-statements as a transformer as shown here
  • Use Nuxt Typescript and add the transformer to the ts-loader config described here as is shown in the examples

Let me know if that worked out for you :)