fix: patch vercel bug which directs user to index.xml

This commit is contained in:
Timothy Lin 2021-06-09 23:37:58 +08:00
parent b44e209385
commit 5945a72491

View File

@ -38,4 +38,17 @@ module.exports = withBundleAnalyzer({
return config
},
async rewrites() {
return {
beforeFiles: [
// Rewrite to prevent a problem when deploying at vercel
// which directs a user to the index.xml instead of index.html
// https://github.com/timlrx/tailwind-nextjs-starter-blog/issues/16
{
source: '/',
destination: '/index',
},
],
}
},
})