Next.js Discord

Discord Forum

Reverting from typescript back to JS

Unanswered
Polish posted this in #help-forum
Open in Discord
PolishOP
Hello. I'm a newbie with Nextjs and webdev in general more or less.

So I started an app with Next.js, using all defaults, latest (so I guess that means Typescript, v 13.4.

So far so good.

So here's the stupid thing, right? I'm still a noob, so I'm not very comfortable with Typescript, so I wrote all my components as plain old Javascript.

But they all have .tsx extensions and I have a tsconfig.json.

And so far, everything worked fine on local, even though I had all plain javascrypt on my typescript files and project.

But of course, now that I want to deploy to production, the type checkers and linters are going crazy.

So I could go through all my files one by one and convert everything (very tedious, not just components, but also cypress tests, etc, would take me a week), or, I'm thinking....

Maybe I could configure/revert my project to plain Javascript?

If so, what's needed? I just change all my .tsx extensions to .jsx? Is that enough? Or would I have to do anything else?


This is just a little side-hobb project of mine. So I'd prefer no lectures on how typescript is "better" than javascript. I'd rather deploy it as fast as possible now the way it is and maybe consider typescript later, when I get a bit more familiar with it....

2 Replies

Asiatic Lion
Changing the filenames should be enough.
1. Change file extensions
2. Remove all typescript stuff (type declaration, type notation, etc)