Docs
Getting Started
Installation

Installation

Million.js assumes that you have an existing React project. To learn about how to create a React app, please see React's documentation (opens in a new tab).

Configure It Yourself

For more control, Million offers customizable options.

Install Million.js

npm install million

Add the compiler to your application

Million.js is supported within the /app ("use client" components only) and /pages

next.config.mjs
import million from 'million/compiler';
 
/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
};
 
const millionConfig = {
  auto: true,
  // if you're using RSC:
  // auto: { rsc: true },
}
 
export default million.next(nextConfig, millionConfig);

Checkout Automatic Mode to learn about the mechanisms behind Automatic mode.