Search code examples
next.jsbundlertranspilerturbopack

How does Next.js bundle code for production?


For Next.js v13+ the documentation says that Turbopack is used by default, except not for building, only for development.

If that's the case, how is code "bundled" for production by default? Do I have the choice to only transpile but not bundle code when using Next.js?

Thank you!


Solution

  • It still uses webpack by default. For now turbopack can only be used in development with next dev --turbo.

    If you only want to transpile your code, you should try to use the babel-cli as described here.