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).
Setup in seconds
The Million.js CLI will automatically install the package and configure your project for you.
npx million@latest
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);