Turbopack build tool in Nextjs projects
How to use Turbopack build tool in Nextjs project
Vercel's Turbopack is the fastest web build tool made with Rust and it smarter than Vitejs which is used in React, Vue and SvelteKit.
Turbopack currently available for Nextjs only.
How do we enable Turbo in Nextjs project. Can try in two methods.
Use a --turbo option in dev script.
"dev": "next dev --turbo",
For using old projects there is another way.
Createa turbo.json file in the root of t
he project with following
//turbo.json
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build": {
"outputs": [".next/**"]
},
"lint": {
"outputs": []
}
}
}