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
4faa281f
Commit
4faa281f
authored
Dec 21, 2016
by
Naoyuki Kanezawa
Committed by
Guillermo Rauch
Dec 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
suppress logging on test (#455)
parent
f1c6ea32
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
webpack.js
server/build/webpack.js
+5
-3
hot-reloader.js
server/hot-reloader.js
+3
-2
index.js
server/index.js
+1
-1
No files found.
server/build/webpack.js
View file @
4faa281f
...
@@ -11,7 +11,7 @@ import DynamicEntryPlugin from './plugins/dynamic-entry-plugin'
...
@@ -11,7 +11,7 @@ import DynamicEntryPlugin from './plugins/dynamic-entry-plugin'
import
DetachPlugin
from
'./plugins/detach-plugin'
import
DetachPlugin
from
'./plugins/detach-plugin'
import
getConfig
from
'../config'
import
getConfig
from
'../config'
export
default
async
function
createCompiler
(
dir
,
{
dev
=
false
}
=
{})
{
export
default
async
function
createCompiler
(
dir
,
{
dev
=
false
,
quiet
=
false
}
=
{})
{
dir
=
resolve
(
dir
)
dir
=
resolve
(
dir
)
const
pages
=
await
glob
(
'pages/**/*.js'
,
{
const
pages
=
await
glob
(
'pages/**/*.js'
,
{
...
@@ -66,9 +66,11 @@ export default async function createCompiler (dir, { dev = false } = {}) {
...
@@ -66,9 +66,11 @@ export default async function createCompiler (dir, { dev = false } = {}) {
new
DynamicEntryPlugin
(),
new
DynamicEntryPlugin
(),
new
UnlinkFilePlugin
(),
new
UnlinkFilePlugin
(),
new
WatchRemoveEventPlugin
(),
new
WatchRemoveEventPlugin
(),
new
WatchPagesPlugin
(
dir
),
new
WatchPagesPlugin
(
dir
)
new
FriendlyErrorsWebpackPlugin
()
)
)
if
(
!
quiet
)
{
plugins
.
push
(
new
FriendlyErrorsWebpackPlugin
())
}
}
else
{
}
else
{
plugins
.
push
(
plugins
.
push
(
new
webpack
.
DefinePlugin
({
new
webpack
.
DefinePlugin
({
...
...
server/hot-reloader.js
View file @
4faa281f
...
@@ -8,8 +8,9 @@ import babel, { watch } from './build/babel'
...
@@ -8,8 +8,9 @@ import babel, { watch } from './build/babel'
import
read
from
'./read'
import
read
from
'./read'
export
default
class
HotReloader
{
export
default
class
HotReloader
{
constructor
(
dir
)
{
constructor
(
dir
,
{
quiet
}
=
{}
)
{
this
.
dir
=
dir
this
.
dir
=
dir
this
.
quiet
=
quiet
this
.
middlewares
=
[]
this
.
middlewares
=
[]
this
.
webpackDevMiddleware
=
null
this
.
webpackDevMiddleware
=
null
this
.
webpackHotMiddleware
=
null
this
.
webpackHotMiddleware
=
null
...
@@ -38,7 +39,7 @@ export default class HotReloader {
...
@@ -38,7 +39,7 @@ export default class HotReloader {
this
.
watch
()
this
.
watch
()
const
[
compiler
]
=
await
Promise
.
all
([
const
[
compiler
]
=
await
Promise
.
all
([
webpack
(
this
.
dir
,
{
dev
:
true
}),
webpack
(
this
.
dir
,
{
dev
:
true
,
quiet
:
this
.
quiet
}),
clean
(
this
.
dir
)
clean
(
this
.
dir
)
])
])
...
...
server/index.js
View file @
4faa281f
...
@@ -23,7 +23,7 @@ export default class Server {
...
@@ -23,7 +23,7 @@ export default class Server {
this
.
quiet
=
quiet
this
.
quiet
=
quiet
this
.
renderOpts
=
{
dir
:
this
.
dir
,
dev
,
staticMarkup
}
this
.
renderOpts
=
{
dir
:
this
.
dir
,
dev
,
staticMarkup
}
this
.
router
=
new
Router
()
this
.
router
=
new
Router
()
this
.
hotReloader
=
dev
?
new
HotReloader
(
this
.
dir
)
:
null
this
.
hotReloader
=
dev
?
new
HotReloader
(
this
.
dir
,
{
quiet
}
)
:
null
this
.
http
=
null
this
.
http
=
null
this
.
config
=
getConfig
(
dir
)
this
.
config
=
getConfig
(
dir
)
...
...
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