npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@opennextjs/aws

v3.2.2

Published

Open source Next.js serverless adapter

Downloads

18,735

Readme


Description

OpenNext takes the Next.js build output and converts it into packages that can be deployed across a variety of environments. Natively OpenNext has support for AWS Lambda, and classic Node.js Server.

Features

OpenNext aims to support all Next.js 14 features. Some features are work in progress. If you are running into any problems make sure to check the docs first before you open a new issue or visit our Discord to let us know!

  • [x] App & Pages Router
  • [x] API routes
  • [x] Dynamic routes
  • [x] Static site generation (SSG)
  • [x] Server-side rendering (SSR)
  • [x] Incremental static regeneration (ISR)
  • [x] Middleware
  • [x] Server actions
  • [x] Image optimization
  • [x] NextAuth.js
  • [x] Running at edge
  • [x] Almost no coldstart (*)

Who is using OpenNext?

Gymshark UK, Udacity, TUDN, NHS England

Configuration

Configuration file

For personalisation you need to create a file open-next.config.ts at the same place as your next.config.js, and export a default object that satisfies the OpenNextConfig interface. It is possible to not have an open-next.config.ts file, the default configuration will then be applied automatically.

Debug mode

OpenNext can be executed in debug mode by setting the environment variable OPEN_NEXT_DEBUG=true before your build.

This will output A LOT of additional logs to the console. This also disable minifying in esbuild, and add source maps to the output. This can result in code that might be up to 2-3X larger than the production build. Do not enable this in production.

You can read more about the configuration in the docs

Preleases

Besides the standard npm releases we also automatically publish prerelease packages on branch pushes (using pkg.pr.new):

  • https://pkg.pr.new/@opennextjs/aws@main: Updated with every push to the main branch, this prerelease contains the most up to date yet (reasonably) stable version of the package.
  • https://pkg.pr.new/@opennextjs/aws@experimental Updated with every push to the experimental 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/@opennextjs/aws@main

Contribute

To run OpenNext locally:

  1. Clone this repository.
  2. Build open-next:
    cd packages/open-next
    pnpm build
  3. Run open-next in watch mode:
    pnpm dev
  4. Now, you can make changes in open-next and build your Next.js app to test the changes.
    cd path/to/my/nextjs/app
    path/to/open-next/packages/open-next/dist/index.js build

Coldstart

OpenNext provide you with a warmer function that can be used to reduce cold start.

On Lambda, there are multiple scenarios where a lambda will trigger a cold start even if you have some warmed instance. For example if you have more requests than warm instances you'll get a cold start. Also NextJs lazy load the routes, so even if you hit a warm instance, this specific route might not have been loaded yet.

Acknowledgements

We are grateful for the projects that inspired OpenNext and the amazing tools and libraries developed by the community:

Special shoutout to @khuezy and @conico974 for their outstanding contributions to the project.


Maintained by SST. Join our community: Discord | YouTube | Twitter