diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..6142811 --- /dev/null +++ b/vercel.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://openapi.vercel.sh/vercel.json", + "framework": "vite", + "buildCommand": "npm run build", + "outputDirectory": "dist", + "installCommand": "npm install", + "rewrites": [ + { "source": "/((?!api/|assets/|fonts/|.*\\.(?:js|css|map|png|jpg|jpeg|svg|gif|webp|ico|woff|woff2|ttf|wasm|webmanifest)).*)", "destination": "/index.html" } + ], + "headers": [ + { + "source": "/sw.js", + "headers": [ + { "key": "Cache-Control", "value": "public, max-age=0, must-revalidate" }, + { "key": "Service-Worker-Allowed", "value": "/" } + ] + }, + { + "source": "/manifest.webmanifest", + "headers": [ + { "key": "Content-Type", "value": "application/manifest+json" }, + { "key": "Cache-Control", "value": "public, max-age=3600" } + ] + }, + { + "source": "/assets/(.*)", + "headers": [ + { "key": "Cache-Control", "value": "public, max-age=31536000, immutable" } + ] + }, + { + "source": "/fonts/(.*)", + "headers": [ + { "key": "Cache-Control", "value": "public, max-age=31536000, immutable" } + ] + } + ] +}