make pageExtensions string array possible to negate values #65789
angelod1as
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
pageExtensions
should consider as pages, we should be able to add negations — files we don't want to be expected as pages, e.g.pageExtensions: ["!.test.tsx"]
or similar..page.tsx
, we'd only exclude the said pages from pageExtension, making it cleaner and easier to maintain.Non-Goals
Background
I want to create test files besides my pages files and they are interpreted as pages. The docs tell me to add the
.page.tsx
suffix to every page, but this gets complicated when there are a lot of existing files in a constant changing environment.Adding an exclusion to
pageExtensions
would make everything way easier, in a way I could just exclude the files that end with.test.tsx
. Easy peasy.Proposal
I don't know exactly how
pageExtensions
work and how it deals with empty values (default). I think it should take into account anything in the array, filtering out the negations. If there's only negations, it treats every file except the negated as valid.I am interested in contributing.
Beta Was this translation helpful? Give feedback.
All reactions