How Next.js Works

What is Compiling?

Developers write code in languages that are more developer-friendly such as JSX, TypeScript, and modern versions of JavaScript. While these languages improve the efficiency and confidence of developers, they need to be compiled into JavaScript before browsers can understand them.

Compiling refers to the process of taking code in one language and outputting it in another language or another version of that language.

In Next.js, compilation happens during the development stage as you edit your code, and as part of the build step to prepare your application for production.

Quick Review: Why does your web application code need to be compiled?