Capítulo 418 de 456
Config option that controls whether Next.js URLs resolve with or without a trailing slash. Default behavior redirects /about/ to /about; enabling the option reverses that.
trailingSlash: true: makes Next.js redirect /about to /about/ instead of the default opposite behavior..well-known/ never get a trailing slash appended.output: "export": when trailingSlash: true is combined with static export, /about outputs as /about/index.html instead of /about.html.module.exports = {
trailingSlash: true,
}
.well-known/.| Version | Changes |
|---|---|
v9.5.0 | trailingSlash added. |
trailingSlash: true inverte esse comportamento..well-known/ nunca ganham trailing slash, mesmo com a flag ligada.output: "export" muda o nome do arquivo HTML gerado (index.html em subpasta em vez de .html).output: "export": interage diretamente com a nomeação dos arquivos HTML de export estático.