Skip to content

fix: copy edge src file #1315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demos/middleware/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
command = "npm run build"
publish = ".next"

[environment]
[build.environment]
NEXT_USE_NETLIFY_EDGE = "true"

[[plugins]]
Expand Down
2 changes: 1 addition & 1 deletion demos/server-components/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
command = "npm run build"
publish = ".next"

[environment]
[build.environment]
NEXT_USE_NETLIFY_EDGE = "true"

[[plugins]]
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/helpers/edge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)', '^/')
Expand Down