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

Move all the modules used in 1/2 of all pages into the common chunks. #1659

Merged
merged 1 commit into from
Apr 7, 2017

Conversation

arunoda
Copy link
Contributor

@arunoda arunoda commented Apr 7, 2017

Just like #1644 but without the public API.

@rauchg rauchg merged commit 060cac3 into vercel:master Apr 7, 2017
@arunoda arunoda deleted the code-split-point-5 branch April 7, 2017 22:54
gcpantazis pushed a commit to gcpantazis/next.js that referenced this pull request Jan 22, 2018
A while ago (in vercel#1644) @arunoda updated the default for minimum refs to
chunk a file into commons from the previous (which I believe was a
static integer, or at least was at some point), and made it so that the
file had to be used in > 50% of the pages.

The problem is that people may use pages in different ways, particularly
if they're using a custom server instead of the default page routing.
For example, I use Styled Components, and put a `styles.js` file
alongside my various page JSX files. Others may colocate JSX components
inside pages, which could be very reasonable depending on the project.

The point is, it's very possible to load up your /pages directory with
JS files that add into the default logic's perception of "page count",
since there's no singular way to determine what is and is not a page
without analyzing the code within.

I'd propose that leave this as the default behavior, since that makes
sense if you're using Next in the OOTB manner, but allow for
configuration if needed. @rauchg suggested as much in vercel#1644 but it seems
like that fell out in the final version (vercel#1659)
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 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.

2 participants