Skip to main content
Bun supports Nuxt out of the box. Initialize a Nuxt app with official nuxi CLI.
terminal

To start the dev server, run bun --bun run dev from the project root. This will execute the nuxt dev command (as defined in the "dev" script in package.json).
The nuxt CLI uses Node.js by default; passing the --bun flag forces the dev server to use the Bun runtime instead.
terminal

Once the dev server spins up, open http://localhost:3000 to see the app. The app will render Nuxt’s built-in NuxtWelcome template component. To start developing your app, replace <NuxtWelcome /> in app.vue with your own UI.
Demo Nuxt app running on
localhost

For production build, while the default preset is already compatible with Bun, you can also use Bun preset to generate better optimized builds.
nuxt.config.ts
Alternatively, you can set the preset via environment variable:
terminal
Some packages provide Bun-specific exports that Nitro will not bundle correctly using the default preset. In this case, you need to use Bun preset so that the packages will work correctly in production builds.
After building with bun, run:
terminal

Refer to the Nuxt website for complete documentation.