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
d2149da5
Commit
d2149da5
authored
Jun 23, 2017
by
Felix-Antoine Paradis
Committed by
Arunoda Susiripala
Jun 23, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the ability to pass next configuration to production builds (#2345)
parent
3a9c4191
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
index.js
server/build/index.js
+2
-2
webpack.js
server/build/webpack.js
+2
-2
No files found.
server/build/index.js
View file @
d2149da5
...
...
@@ -7,9 +7,9 @@ import webpack from './webpack'
import
replaceCurrentBuild
from
'./replace'
import
md5File
from
'md5-file/promise'
export
default
async
function
build
(
dir
)
{
export
default
async
function
build
(
dir
,
conf
=
null
)
{
const
buildDir
=
join
(
tmpdir
(),
uuid
.
v4
())
const
compiler
=
await
webpack
(
dir
,
{
buildDir
})
const
compiler
=
await
webpack
(
dir
,
{
buildDir
,
conf
})
try
{
await
runCompiler
(
compiler
)
...
...
server/build/webpack.js
View file @
d2149da5
...
...
@@ -27,9 +27,9 @@ const interpolateNames = new Map(defaultPages.map((p) => {
const
relativeResolve
=
rootModuleRelativePath
(
require
)
export
default
async
function
createCompiler
(
dir
,
{
dev
=
false
,
quiet
=
false
,
buildDir
}
=
{})
{
export
default
async
function
createCompiler
(
dir
,
{
dev
=
false
,
quiet
=
false
,
buildDir
,
conf
=
null
}
=
{})
{
dir
=
resolve
(
dir
)
const
config
=
getConfig
(
dir
)
const
config
=
getConfig
(
dir
,
conf
)
const
defaultEntries
=
dev
?
[
join
(
__dirname
,
'..'
,
'..'
,
'client'
,
'webpack-hot-middleware-client'
),
join
(
__dirname
,
'..'
,
'..'
,
'client'
,
'on-demand-entries-client'
)
...
...
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