diff --git a/vercel.json b/vercel.json index 182cfcfa..566c9691 100644 --- a/vercel.json +++ b/vercel.json @@ -1,40 +1,21 @@ { "version": 2, - "buildCommand": "cd frontend && npm install && npm run build", - "outputDirectory": "frontend/build", - "framework": null, - "rewrites": [ + "builds": [ { - "source": "/(.*)", - "destination": "/index.html" + "src": "frontend/package.json", + "use": "@vercel/static-build", + "config": { + "distDir": "build" + } } ], - "headers": [ + "routes": [ { - "source": "/(.*)", - "headers": [ - { - "key": "X-Content-Type-Options", - "value": "nosniff" - }, - { - "key": "X-Frame-Options", - "value": "DENY" - }, - { - "key": "X-XSS-Protection", - "value": "1; mode=block" - } - ] - }, - { - "source": "/static/(.*)", - "headers": [ - { - "key": "Cache-Control", - "value": "public, max-age=31536000, immutable" - } - ] + "src": "/(.*)", + "dest": "/frontend/$1" } - ] + ], + "env": { + "REACT_APP_ENVIRONMENT": "production" + } }