Closed
Description
Summary
Have an issue with trailing slashes not working on Netlify when using trailingSlash: true
in the next.config.js
file. When visiting /test
it doesn't redirect to /test/
. Tested on both version 4.1.0 and 4.2.0 of netlify-plugin-nextjs.
Steps to reproduce
In the next.config.js file:
module.exports = {
reactStrictMode: true,
trailingSlash: true,
}
Site with version 4.1.0. Visit site, add /test to the url.
GitHub repo of site.
Site with version 4.2.0 of the plugin. Visit site, add /test to the url.
GitHub repo
A link to a reproduction repository
https://github.com/MelvinPeepers/next_trailing_slash
Plugin version
4.2.0
More information about your build
- I am building using the CLI
- I am building using file-based configuration (
netlify.toml
)
What OS are you using?
No response
Your netlify.toml file
`netlify.toml`
# Paste content of your `netlify.toml` file here
Your public/_redirects file
`_redirects`
# Paste content of your `_redirects` file here
Your next.config.js
file
`next.config.js`
# Paste content of your `next.config.js` file here. Check there is no private info in there.
Builds logs (or link to your logs)
Build logs
# Paste logs here
Function logs
Function logs
# Paste logs here
.next JSON files
generated .next JSON files
# Paste file contents here. Please check there isn't any private info in them
# You can either build locally, or download the deploy from Netlify by clicking the arrow next to the deploy time.