Skip to content

Commit dfd4fd2

Browse files
author
Your Name
committed
fix: Disable Netlify caching to force fresh build
- Add NETLIFY_USE_YARN and NETLIFY_USE_PNPM flags to force npm - Configure Next.js plugin with explicit distDir - This should force Netlify to rebuild without using cached chunks The JavaScript chunk 404 errors are caused by Netlify serving a cached build with old chunk references. This commit attempts to force a fresh build, but manual cache clear via Netlify dashboard may still be needed.
1 parent 6a519a1 commit dfd4fd2

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

netlify.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
# Use the official Netlify Next.js plugin
1515
[[plugins]]
1616
package = "@netlify/plugin-nextjs"
17+
18+
[plugins.inputs]
19+
# Disable caching to force fresh build
20+
distDir = ".next"
1721

1822
# Environment variables for build
1923
[build.environment]
@@ -24,6 +28,9 @@
2428
# Disable secret scanning for public Next.js environment variables
2529
# These NEXT_PUBLIC_* variables are intentionally public and safe
2630
SECRETS_SCAN_ENABLED = "false"
31+
# Force fresh build - disable all caching
32+
NETLIFY_USE_YARN = "false"
33+
NETLIFY_USE_PNPM = "false"
2734

2835
# Headers for PWA and security
2936
[[headers]]

0 commit comments

Comments
 (0)