Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
9c2db291
Commit
9c2db291
authored
Jun 21, 2017
by
Sasha Aickin
Committed by
Arunoda Susiripala
Jun 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed an issue where two-page sites didn't split code. (#2329)
parent
8017bd37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
webpack.js
server/build/webpack.js
+6
-1
No files found.
server/build/webpack.js
View file @
9c2db291
...
@@ -102,7 +102,12 @@ export default async function createCompiler (dir, { dev = false, quiet = false,
...
@@ -102,7 +102,12 @@ export default async function createCompiler (dir, { dev = false, quiet = false,
return
module
.
context
&&
module
.
context
.
indexOf
(
'node_modules'
)
>=
0
return
module
.
context
&&
module
.
context
.
indexOf
(
'node_modules'
)
>=
0
}
}
// Move modules used in at-least 1/2 of the total pages into commons.
// If there are one or two pages, only move modules to common if they are
// used in all of the pages. Otherwise, move modules used in at-least
// 1/2 of the total pages into commons.
if
(
totalPages
<=
2
)
{
return
count
===
totalPages
}
return
count
>=
totalPages
*
0.5
return
count
>=
totalPages
*
0.5
}
}
}),
}),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment