-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnetlify.toml
More file actions
36 lines (31 loc) · 1.11 KB
/
netlify.toml
File metadata and controls
36 lines (31 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
[build]
command = "npm run build"
publish = ".next"
[build.environment]
# Pin Node version to match Netlify's default and ensure consistency
NODE_VERSION = "20"
# Disable secrets scanning for expected NEXT_PUBLIC_ variables
SECRETS_SCAN_OMIT_KEYS = "NEXT_PUBLIC_STRAPI_API_URL,NEXT_PUBLIC_EMAILJS_SERVICE_ID,NEXT_PUBLIC_EMAILJS_TEMPLATE_ID,NEXT_PUBLIC_EMAILJS_PUBLIC_KEY"
# Add Next.js version for debugging
NEXT_PUBLIC_NEXT_VERSION = "14.2.32"
# Add Netlify context for diagnostics
NEXT_PUBLIC_NETLIFY_CONTEXT = "$CONTEXT"
# Next.js specific configuration with enhanced settings
[[plugins]]
package = "@netlify/plugin-nextjs"
# Cache optimization
[[headers]]
for = "/_next/static/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
# Image optimization redirects
[[redirects]]
from = "/_next/image"
to = "/.netlify/images?url=:url&w=:width&q=:quality"
status = 200
query = {q = ":quality", url = ":url", w = ":width"}
[[redirects]]
from = "/_ipx/*"
to = "/.netlify/images?url=:url&w=:width&q=:quality"
status = 200
query = {q = ":quality", url = ":url", w = ":width"}