next.js
04cc37f7 - Add docs for using pageExtensions to colocate other files with page components (#22740)

Commit
4 years ago
Add docs for using pageExtensions to colocate other files with page components (#22740) Feel free to edit this/suggest changes as you see fit to match the style of your docs or how you want this feature represented. There seemed to be many issues regarding colocating non-page files with page components in the `pages` directory where `pageExtensions` was finally suggested as a solution. I think it would be great to document it better since it seems to be a often requested workflow to colocate test, generated files, styles, and other files needed by page components in the `pages` directory. The note that exists in the docs currently alludes to the ability to do this but it doesn't contain much context that would help make it more discoverable. Relevant issues: https://github.com/vercel/next.js/discussions/11113#discussioncomment-427139 https://github.com/vercel/next.js/issues/8454#issuecomment-560432659 https://github.com/vercel/next.js/issues/8617#issuecomment-790030032 https://github.com/vercel/next.js/issues/3728#issuecomment-523789071
Author
Parents
Loading