diff --git a/package.json b/package.json index edc9feb..f28376a 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,5 @@ "typescript": "^5.0.2", "vite": "^4.4.5", "vite-plugin-node-polyfills": "^0.19.0" - }, - "homepage": "" + } } diff --git a/public/package.json b/public/package.json index cade961..247901e 100644 --- a/public/package.json +++ b/public/package.json @@ -16,6 +16,5 @@ "repository": { "type": "git", "url": "https://github.com/decentraland/auth.git" - }, - "homepage": "" + } } diff --git a/public/vercel.json b/public/vercel.json new file mode 100644 index 0000000..9ba4396 --- /dev/null +++ b/public/vercel.json @@ -0,0 +1,8 @@ +{ + "rewrites": [ + { + "source": "/[^.]+", + "destination": "/index.html" + } + ] +} diff --git a/scripts/prebuild.cjs b/scripts/prebuild.cjs index 0715894..3f70ce6 100644 --- a/scripts/prebuild.cjs +++ b/scripts/prebuild.cjs @@ -57,6 +57,11 @@ function getPublicUrls() { VITE_BASE_URL: cdnUrl } } + if (isVercel) { + return { + VITE_BASE_URL: undefined + } + } // localhost console.log('Using empty pubic url') return { diff --git a/vercel.json b/vercel.json index a6ef456..df40d62 100644 --- a/vercel.json +++ b/vercel.json @@ -10,10 +10,11 @@ "github": { "silent": true }, - "rewrites": [ + "redirects": [ { - "source": "/(.*)", - "destination": "/" + "source": "/", + "destination": "/auth" } - ] + ], + "rewrites": [{ "source": "/(.*)", "destination": "/" }] }