Skip to content

Commit be15131

Browse files
authored
fix: redirect loop (#166)
## Summary by Sourcery Fixes a redirect loop on the /documentation path by ensuring a trailing slash is present. Bug Fixes: - Fixes a redirect loop by adding a trailing slash to the `basePath` and introducing a rewrite rule to redirect `/documentation` to `/documentation/`. Build: - Enables `trailingSlash` in the next.config.js file.
1 parent bc293c0 commit be15131

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

next.config.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const config = {
77
reactStrictMode: true,
88
output: 'standalone',
99
basePath: '/documentation',
10+
trailingSlash: true,
1011
serverExternalPackages: ['oxc-transform'],
1112
eslint: {
1213
ignoreDuringBuilds: true,
@@ -22,6 +23,14 @@ const config = {
2223
inlineCss: true,
2324
reactCompiler: true,
2425
},
26+
async rewrites() {
27+
return [
28+
{
29+
source: '/documentation',
30+
destination: '/documentation/',
31+
},
32+
];
33+
},
2534
};
2635

2736
export default withMDX(config);

0 commit comments

Comments
 (0)