Turbopack is the fastest Vercel’s 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.
Create a turbo.json file in the root of the project with following
//turbo.json
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build": {
"outputs": [".next/**"]
},
"lint": {
"outputs": []
}
}
}
Then we can use the turbo dev command as follows
npx turbo dev
[display-posts tag=nextjs