You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using dynamic route where I have two files, [...slug].js and blog.js. So, ideally /blog should render content of blog.js file and any other route render content of '[...slug].js' which is working fine but as soon as I add trailingSlash: true, in next.config.js. It renders content of [...slug].js for all the routes.
This discussion was converted from issue #17509 on October 01, 2020 09:27.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using dynamic route where I have two files,
[...slug].js
andblog.js
. So, ideally/blog
should render content ofblog.js
file and any other route render content of '[...slug].js' which is working fine but as soon as I addtrailingSlash: true,
innext.config.js
. It renders content of[...slug].js
for all the routes.It is happening for CSR only.
Repo: https://github.com/shubuu97/next_trailingslash_issue
Beta Was this translation helpful? Give feedback.
All reactions