forked from jmug/cactoide
feat: add netlify adapter
This commit is contained in:
36
netlify.toml
Normal file
36
netlify.toml
Normal file
@@ -0,0 +1,36 @@
|
||||
[build]
|
||||
# Build command for SvelteKit
|
||||
command = "npm run build"
|
||||
|
||||
# Publish directory (where the built files are located)
|
||||
publish = "build"
|
||||
|
||||
[build.environment]
|
||||
# Node.js version for the build environment
|
||||
NODE_VERSION = "18"
|
||||
|
||||
# Redirects for SvelteKit routing
|
||||
[[redirects]]
|
||||
# Handle client-side routing for SPA
|
||||
from = "/*"
|
||||
to = "/index.html"
|
||||
status = 200
|
||||
|
||||
# Headers for better performance and security
|
||||
[[headers]]
|
||||
for = "/*"
|
||||
[headers.values]
|
||||
# Cache static assets
|
||||
Cache-Control = "public, max-age=31536000, immutable"
|
||||
|
||||
[[headers]]
|
||||
for = "/*.html"
|
||||
[headers.values]
|
||||
# Don't cache HTML files
|
||||
Cache-Control = "public, max-age=0, must-revalidate"
|
||||
|
||||
[[headers]]
|
||||
for = "/assets/*"
|
||||
[headers.values]
|
||||
# Cache assets for a long time
|
||||
Cache-Control = "public, max-age=31536000, immutable"
|
||||
Reference in New Issue
Block a user