-
Notifications
You must be signed in to change notification settings - Fork 27.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make pages glob pattern overridable #3195
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't see any harm in adding this 👍 I do want to keep this as 'internal' (undocumented) cause it's not a practice we endorse.
@timneutkens Gotta ask, why is it not an endorsed practice? (Might be better to have a statement on that before we link this PR up with all the duplicates of issue #3183 ... Theres at least 4) |
@@ -47,7 +47,7 @@ export default async function createCompiler (dir, { buildId, dev = false, quiet | |||
] | |||
} | |||
|
|||
const pages = await glob('pages/**/*.js', { cwd: dir }) | |||
const pages = await glob(config.pagesGlobPattern, { cwd: dir }) | |||
const devPages = pages.filter((p) => p === 'pages/_document.js' || p === 'pages/_error.js') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timneutkens This would stil "lock" override pages within "pages" directory?
Why not put this in the docs? Even if it's their with a caveat. My test files are colocated with the implementations . I don't want to have to do something different just for the pages. |
It's not in the docs as this was removed. |
As in this PR was reverted? Can we get a link to the revert? |
@jpellizzari someone could probably find where this change was reverted.. but what would be the point? |
It would be great if next automatically ignored files with an underscore prefix inside the pages folder. That way relevant files can be nicely co-located. |
This fixes #3183