Skip to content
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

Merged
merged 1 commit into from
Nov 5, 2017
Merged

Conversation

emattias
Copy link
Contributor

This fixes #3183

Copy link
Member

@timneutkens timneutkens left a 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 timneutkens merged commit 3eac0bc into vercel:canary Nov 5, 2017
@zenflow
Copy link
Contributor

zenflow commented Nov 11, 2017

@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')
Copy link
Contributor

@alexindigo alexindigo Dec 11, 2017

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?

@djskinner
Copy link

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.

@timneutkens
Copy link
Member

It's not in the docs as this was removed.

@jpellizzari
Copy link

It's not in the docs as this was removed.

As in this PR was reverted? Can we get a link to the revert?

@zenflow
Copy link
Contributor

zenflow commented Mar 20, 2019

@jpellizzari someone could probably find where this change was reverted.. but what would be the point?

@quantizor
Copy link
Contributor

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.

@vercel vercel locked as resolved and limited conversation to collaborators Aug 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The build assumes that all js files under /pages is a page
7 participants