Code Monkey home page Code Monkey logo

netlify-plugin-nextjs's Introduction

Next.js on Netlify Build Plugin

Essential Next.js Build Plugin (beta)

⚠️ This is the beta version of the Essential Next.js plugin. For the stable version, refer to Essential Next.js plugin v3 ⚠️

What's new in this version

Version 4 is a complete rewrite of the Essential Next.js plugin. For full details of everything that's new, check out the v4 release notes

Installing the beta

  • Install the module:
npm install -D @netlify/plugin-nextjs@beta
  • Change the publish directory to .next and add the plugin to netlify.toml if not already installed:
[build]
publish = ".next"

[[plugins]]
package = "@netlify/plugin-nextjs"

If you previously set a custom distDir in your next.config.js, or set node_bundler or external_node_modules in your netlify.toml these are no longer needed and can be removed.

The serverless and experimental-serverless-trace targets are deprecated in Next 12, and all builds with this plugin will now use the default server target. If you previously set the target in your next.config.js, you should remove it.

If you are using a monorepo you will need to change publish to point to the full path to the built .next directory, which may be in a subdirectory. If you have changed your distDir then it will need to match that.

If you are using Nx, then you will need to point publish to the folder inside dist, e.g. dist/apps/myapp/.next.

If you currently use redirects or rewrites on your site, see the Rewrites and Redirects guide for information on changes to how they are handled in this version.

If you want to use Next 12's beta Middleware feature, this will mostly work as expected but please read the docs on some caveats and workarounds that are currently needed.

Beta feedback

Please share any thoughts, feedback or questions about the beta in our discussion.

netlify-plugin-nextjs's People

Contributors

ascorbic avatar erezrokah avatar grountish avatar lindsaylevine avatar renovate-bot avatar renovate[bot] avatar rstavchansky avatar token-generator-app[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.