mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-13 17:43:59 +00:00
f2672ac230
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
743 B
743 B
Nitro
It is possible to use the Nuxt3 rendering engine (Nitro) with Nuxt2 via a compatibility module.
-
Install
@nuxt/nitro
as a devDependency:yarn add --dev @nuxt/nitro
-
Add
@nuxt/nitro/compat
tobuildModules
insidenuxt.config
:export default { buildModules: [ '@nuxt/nitro/compat' ] }
-
If you have selected
target: 'static'
in yournuxt.config
, update thebuild
script in package.json to benuxt generate
:{ "scripts": { "build": "nuxt generate" } }
Now, when you build your project, Nitro will generate an optimized server bundle for fast, next-generation edge rendering.