Skip to content

Commit ccdb544

Browse files
authored
fix: copy edge src file (#1315)
* fix: copy src file not compiled * ci: fix test env
1 parent 3e834f3 commit ccdb544

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

demos/middleware/netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
command = "npm run build"
33
publish = ".next"
44

5-
[environment]
5+
[build.environment]
66
NEXT_USE_NETLIFY_EDGE = "true"
77

88
[[plugins]]

demos/server-components/netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
command = "npm run build"
33
publish = ".next"
44

5-
[environment]
5+
[build.environment]
66
NEXT_USE_NETLIFY_EDGE = "true"
77

88
[[plugins]]

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"prepublishOnly": "run-s publish:pull publish:install clean build test",
3838
"publish:pull": "git pull",
3939
"publish:install": "npm ci",
40-
"publish:test": "npm test",
40+
"publish:test": "cd .. && npm ci && npm test",
4141
"clean": "rimraf lib",
4242
"build": "tsc",
4343
"watch": "tsc --watch",

plugin/src/helpers/edge.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const copyEdgeSourceFile = ({
8181
file: string
8282
edgeFunctionDir: string
8383
target?: string
84-
}) => fs.copyFile(join(__dirname, '..', 'templates', 'edge', file), join(edgeFunctionDir, target ?? file))
84+
}) => fs.copyFile(join(__dirname, '..', '..', 'src', 'templates', 'edge', file), join(edgeFunctionDir, target ?? file))
8585

8686
// Edge functions don't support lookahead expressions
8787
const stripLookahead = (regex: string) => regex.replace('^/(?!_next)', '^/')

0 commit comments

Comments
 (0)