0.0.4 • Published 5 years ago
@netlify/plugin-next v0.0.4
Netlify Next.js Build Plugin
Enable Next.js dynamic routes on Netlify.
Installation and Usage
Install the dependency from
npmnpm install @netlify/plugin-nextThen add the following lines to your
netlify.tomlfile:[[plugins]] package = "@netlify/plugin-next"Ensure that your
next.config.jshas thetargetset toserverless// next.config.js module.exports = { // Target must be serverless target: 'serverless' };Ensure the following values in
netlify.toml.build
commandisnext build, or running it under the hood.functiondir is set toout_functionspublishdir is set toout_publish[build] command = "next build" functions = "out_functions" publish = "out_publish"
Config should ultimately look something like:
[build]
command = "npm run build"
functions = "out_functions"
publish = "out_publish"
[[plugins]]
package = "@netlify/plugin-next"