Using Million.js with Remix: A Workaround
If you are looking to improve the performance of any React project in 2025, I recommend using React Compiler.
Remix is a full‑stack framework that leans heavily on web standards and streamlined data flows to boost speed and developer productivity. Million.js is a React‑centric compiler/runtime tool built to accelerate rendering by optimizing the virtual DOM and component updates. When you look at Remix and Million.js side by side, you see two tools that share a clear goal: making the web faster by simplifying backend logic and enhancing frontend performance. Yet despite this overlap in goals, they don’t play nicely out of the box.
There’s an issue on GitHub documenting this, with the main concern being that Remix does not have support for 3rd-party custom plugins to alter its build process:
This design is intentional. The team wants to abstract away much of the build configuration for simplicity and to encourage standards.
Although Remix does not expose a plugins API, there is actually a way to make them work together. You see, Million.js exports an ESBuild plugin:
And using a tool called remix-esbuild-override, we can actually inject ESBuild plugins into the Remix build process:
[Removed]
Your remix.config.js should look like:
[Removed]
I have tested this setup in my personal projects and it works fine.