Skip to content

chore: move to paths relative to monorepo root for new monorepo support #2259

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

Closed
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
8 changes: 4 additions & 4 deletions demos/base-path/netlify.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[build]
command = "next build"
publish = ".next"
command = "npm run build -w demos/base-path"
publish = "demos/base-path/.next"
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"

[build.environment]
# cache Cypress binary in local "node_modules" folder
# so Netlify caches it
CYPRESS_CACHE_FOLDER = "../node_modules/.CypressBinary"
CYPRESS_CACHE_FOLDER = "node_modules/.CypressBinary"

[[plugins]]
package = "@netlify/plugin-nextjs"
Expand All @@ -16,4 +16,4 @@ package = "@netlify/plugin-nextjs"
package = "@netlify/plugin-local-install-core"

[[plugins]]
package = "../plugin-wrapper"
package = "./demos/plugin-wrapper"
6 changes: 3 additions & 3 deletions demos/canary/netlify.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build]
command = "next build"
publish = ".next"
command = "npm run build -w demos/canary"
publish = "demos/canary/.next"
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"

[build.environment]
Expand All @@ -15,4 +15,4 @@ package = "@netlify/plugin-nextjs"
package = "@netlify/plugin-local-install-core"

[[plugins]]
package = "../plugin-wrapper"
package = "./demos/plugin-wrapper"
6 changes: 3 additions & 3 deletions demos/custom-routes/netlify.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build]
command = "next build"
publish = ".next"
command = "npm run build -w demos/custom-routes"
publish = "demos/custom-routes/.next"
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"

[[plugins]]
Expand All @@ -11,4 +11,4 @@ package = "@netlify/plugin-nextjs"
package = "@netlify/plugin-local-install-core"

[[plugins]]
package = "../plugin-wrapper"
package = "./demos/plugin-wrapper"
10 changes: 5 additions & 5 deletions demos/default/netlify.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[build]
command = "next build"
publish = ".next"
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
command = "npm run build -w demos/default"
publish = "demos/default/.next"
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./; fi;"

[build.environment]
# cache Cypress binary in local "node_modules" folder
# so Netlify caches it
CYPRESS_CACHE_FOLDER = "../node_modules/.CypressBinary"
CYPRESS_CACHE_FOLDER = "node_modules/.CypressBinary"
# set TERM variable for terminal output
TERM = "xterm"
NODE_VERSION = "16.15.1"
Expand All @@ -28,4 +28,4 @@ package = "@netlify/plugin-nextjs"
package = "@netlify/plugin-local-install-core"

[[plugins]]
package = "../plugin-wrapper"
package = "./demos/plugin-wrapper"
8 changes: 4 additions & 4 deletions demos/middleware/netlify.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build]
command = "npm run build"
publish = ".next"
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
command = "npm run build -w demos/middleware"
publish = "demos/middleware/.next"
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./; fi;"

[build.environment]
NEXT_SPLIT_API_ROUTES = "true"
Expand All @@ -15,7 +15,7 @@ package = "@netlify/plugin-nextjs"
package = "@netlify/plugin-local-install-core"

[[plugins]]
package = "../plugin-wrapper"
package = "./demos/plugin-wrapper"
# Uncomment this if testing the built files rather than dev
# [dev]
# framework = "#static"
Expand Down
8 changes: 4 additions & 4 deletions demos/next-auth/netlify.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build]
command = "next build"
publish = ".next"
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
command = "npm run build -w demos/next-auth"
publish = "demos/next-auth/.next"
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./; fi;"

[build.environment]
TERM = "xterm"
Expand All @@ -14,4 +14,4 @@ package = "@netlify/plugin-nextjs"
package = "@netlify/plugin-local-install-core"

[[plugins]]
package = "../plugin-wrapper"
package = "./demos/plugin-wrapper"
8 changes: 4 additions & 4 deletions demos/next-export/netlify.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build]
command = "next build && next export"
publish = "out"
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
command = "npm run build -w demos/next-export"
publish = "demos/next-export/out"
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./; fi;"

[build.environment]
NETLIFY_NEXT_PLUGIN_SKIP = "true"
Expand All @@ -14,4 +14,4 @@ package = "@netlify/plugin-nextjs"
package = "@netlify/plugin-local-install-core"

[[plugins]]
package = "../plugin-wrapper"
package = "./demos/plugin-wrapper"
1 change: 1 addition & 0 deletions demos/next-export/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"typescript": "^4.6.3"
},
"scripts": {
"build": "next build && next export",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
Expand Down
8 changes: 4 additions & 4 deletions demos/next-i18next/netlify.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build]
command = "next build"
publish = ".next"
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
command = "npm run build -w demos/next-i18next"
publish = "demos/next-i18next/.next"
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./; fi;"

[[plugins]]
package = "@netlify/plugin-nextjs"
Expand All @@ -11,4 +11,4 @@ package = "@netlify/plugin-nextjs"
package = "@netlify/plugin-local-install-core"

[[plugins]]
package = "../plugin-wrapper"
package = "./demos/plugin-wrapper"
6 changes: 3 additions & 3 deletions demos/next-with-edge-functions/netlify.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build]
command = "next build"
publish = ".next"
command = "npm run build -w demos/next-with-edge-functions"
publish = "demos/next-with-edge-functions/.next"

[[plugins]]
package = "@netlify/plugin-nextjs"
Expand All @@ -10,4 +10,4 @@ package = "@netlify/plugin-nextjs"
package = "@netlify/plugin-local-install-core"

[[plugins]]
package = "../plugin-wrapper"
package = "./demos/plugin-wrapper"
8 changes: 4 additions & 4 deletions demos/nx-next-monorepo-demo/netlify.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[build]
command = "npm run build"
command = "npm run build -w demos/nx-next-monorepo-demo"
publish = "dist/apps/demo-monorepo/.next"
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./; fi;"

[build.environment]
NEXT_SPLIT_API_ROUTES = "true"
NEXT_BUNDLE_BASED_ON_NFT_FILES = "true"

[dev]
command = "npm run start"
command = "npm run start -w demos/nx-next-monorepo-demo"
targetPort = 4200

[[plugins]]
package = "../plugin-wrapper"
package = "./demos/plugin-wrapper"

[[plugins]]
package = "@netlify/plugin-nextjs"
Expand Down
8 changes: 4 additions & 4 deletions demos/static-root/netlify.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build]
command = "next build"
publish = ".next"
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ../..; fi;"
command = "npm run build -w demos/static-root"
publish = "demos/static-root/.next"
ignore = "if [ $CACHED_COMMIT_REF == $COMMIT_REF ]; then (exit 1); else git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ./; fi;"

[build.environment]
NEXT_SPLIT_API_ROUTES = "true"
Expand All @@ -15,4 +15,4 @@ package = "@netlify/plugin-nextjs"
package = "@netlify/plugin-local-install-core"

[[plugins]]
package = "../plugin-wrapper"
package = "./demos/plugin-wrapper"