diff --git a/demos/middleware/netlify.toml b/demos/middleware/netlify.toml index 0a5d2ad069..8140d0c2e4 100644 --- a/demos/middleware/netlify.toml +++ b/demos/middleware/netlify.toml @@ -2,7 +2,7 @@ command = "npm run build" publish = ".next" -[environment] +[build.environment] NEXT_USE_NETLIFY_EDGE = "true" [[plugins]] diff --git a/demos/server-components/netlify.toml b/demos/server-components/netlify.toml index 0a5d2ad069..8140d0c2e4 100644 --- a/demos/server-components/netlify.toml +++ b/demos/server-components/netlify.toml @@ -2,7 +2,7 @@ command = "npm run build" publish = ".next" -[environment] +[build.environment] NEXT_USE_NETLIFY_EDGE = "true" [[plugins]] diff --git a/package-lock.json b/package-lock.json index c10fbab4ac..6db0d8896b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22963,7 +22963,7 @@ }, "plugin": { "name": "@netlify/plugin-nextjs", - "version": "4.3.2", + "version": "4.4.0", "license": "ISC", "dependencies": { "@netlify/functions": "^1.0.0", diff --git a/plugin/package.json b/plugin/package.json index 3623ffb496..f271f82b1a 100644 --- a/plugin/package.json +++ b/plugin/package.json @@ -37,7 +37,7 @@ "prepublishOnly": "run-s publish:pull publish:install clean build test", "publish:pull": "git pull", "publish:install": "npm ci", - "publish:test": "npm test", + "publish:test": "cd .. && npm ci && npm test", "clean": "rimraf lib", "build": "tsc", "watch": "tsc --watch", diff --git a/plugin/src/helpers/edge.ts b/plugin/src/helpers/edge.ts index a685bc92c1..7f38132b57 100644 --- a/plugin/src/helpers/edge.ts +++ b/plugin/src/helpers/edge.ts @@ -81,7 +81,7 @@ const copyEdgeSourceFile = ({ file: string edgeFunctionDir: string target?: string -}) => fs.copyFile(join(__dirname, '..', 'templates', 'edge', file), join(edgeFunctionDir, target ?? file)) +}) => fs.copyFile(join(__dirname, '..', '..', 'src', 'templates', 'edge', file), join(edgeFunctionDir, target ?? file)) // Edge functions don't support lookahead expressions const stripLookahead = (regex: string) => regex.replace('^/(?!_next)', '^/')