#How can I switch from typescript to Javascript for the example apps?

5 messages · Page 1 of 1 (latest)

dawn cobalt
#

All the examples at https://nextjs.org/examples are built using type script. How do I switch to Javascript?

Next.js Examples – Styling, data fetching, authentication, CMS, databases, state management, and more.

vivid cedar
#

Enable the allowJs config option in tsconfig

#

But if they use types you’ll run into errors if you just rename the file from ts to js

#

Why not just use ts?

#

You can really loosen up the config if you want to avoid most of the compiler errors