# Nitro

> It is possible to use the Nuxt3 rendering engine (Nitro) with Nuxt2 via a compatibility module.

1. Install `@nuxt/nitro` as a devDependency:

   ```bash
   yarn add --dev @nuxt/nitro
   ```

1. Add `@nuxt/nitro/compat` to `buildModules` inside `nuxt.config`:

   ```ts [nuxt.config.js]
   export default {
     buildModules: [
       '@nuxt/nitro/compat'
     ]
   }
   ```

1. If you have selected `target: 'static'` in your `nuxt.config`, update the `build` script in package.json to be `nuxt generate`:

   ```json [package.json]
   {
     "scripts": {
       "build": "nuxt generate"
     }
   }
   ```

Now, when you build your project, Nitro will generate an optimized server bundle for fast, next-generation edge rendering.