How to setup basePath

I want to setup basePath for my app. I changed next.config, utils/trpc, pages/_app
...
trailingSlash: true,
basePath: '/test',
async redirects () {
return [
{
source: '/',
destination: '/test',
basePath: false,
permanent: false,
}
];
},
...
trailingSlash: true,
basePath: '/test',
async redirects () {
return [
{
source: '/',
destination: '/test',
basePath: false,
permanent: false,
}
];
},
url: `${getBaseUrl()}/test/api/trpc`,
url: `${getBaseUrl()}/test/api/trpc`,
<SessionProvider session={session} basePath={`/test/api/auth`}>
<Component {...pageProps} />
</SessionProvider>
<SessionProvider session={session} basePath={`/test/api/auth`}>
<Component {...pageProps} />
</SessionProvider>
App seem to work but the webpack hmr seems to be broken after that. I keep getting hmr connection errors warnings. Anyone can help me how to fix this ?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server