OpenNext is an adapter that enables the deployment of Next.js applications to Azion's developer platform.
This monorepo includes a package for adapting a Next.js application built via next build
(in standalone mode) to run in the Azion runtime.
To get started with OpenNext for Azion, you need to have an existing Next.js project or create a new Next.js project.
Or see the playground-13 example for a simple Next.js application that uses the OpenNext for Azion package.
To build, run the following command:
pnpm add @aziontech/opennextjs-azion
Then, you can build your Next.js application with the following command:
pnpm exec opennextjs-azion build
To preview your application, you can run:
pnpm exec opennextjs-azion preview
The repository contains two directories:
packages
containing a azion package that can be used to build a Azion compatible output for Next.js applications.
Besides the standard npm releases we also automatically publish prerelease packages on branch pushes (using pkg.pr.new
):
https://pkg.pr.new/@aziontech/opennextjs-azion@main
: Updated with every push to themain
branch, this prerelease contains the most up to date yet (reasonably) stable version of the package.https://pkg.pr.new/@aziontech/opennextjs-azion@experimental
Updated with every push to theexperimental
branch, this prerelease contains the latest experimental version of the package (containing features that we want to test/experiment on before committing to).
Which you can simply install directly with your package manager of choice, for example:
npm i https://pkg.pr.new/@aziontech/opennextjs-azion@main
See the CONTRIBUTING page for how to get started with this repository.