Next.js Zero Runtime JS

September 07, 2022

·

You can configure a Next.js page component by exporting a config object. With the unstable_runtimeJS key you can choose to disable any client JavaScript bundle from the page rendered by ReactDOMServer.

import { PageConfig } from 'next'

export const config: PageConfig = {
  unstable_runtimeJS: false
}

export default function SimplePage() {
  return <h1>No client JavaScript bundle!</h1>
}