remix
remix copied to clipboard
Routing file version 2 nested layout path does not match
What version of Remix are you using?
1.11.1
Steps to Reproduce
Test repository: https://github.com/akun2333/remix-netlify Deploy demo: https://superlative-chimera-88b2c1.netlify.app/
Expected Behavior
Normal route matching
Actual Behavior
The access path post/about is fine in development mode, but not when deployed to netlify
not getting post/about in dev, but when using flat routes and folders, the route file must be index
app/
├── routes/
│ └── _post.post/about
│ └── index.md
@akun2333 Remember that once you start adding folders, flat routes will switch to flat-folders mode (it assumes you want colocation). The folder name itself is the route. The route file must be index.js or (.tsx, .md, etc.).
It's the same as the index file when doing imports from a folder. import About from '~/routes/_post.post/about'
Any other file, like component.tsx, styles.css, logo.png, etc. will be treated as a colocated file.
flat-file
routes/_post.post.about.md
flat-folder
routes/_post.post.about/index.md