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
77a138cc
Commit
77a138cc
authored
Oct 08, 2018
by
Tim Neutkens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove devFiles
parent
6dd910d0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
25 deletions
+1
-25
render.js
packages/next-server/server/render.js
+0
-2
webpack.js
packages/next/build/webpack.js
+0
-17
_document.js
packages/next/pages/_document.js
+1
-2
rendering.js
test/integration/basic/test/rendering.js
+0
-4
No files found.
packages/next-server/server/render.js
View file @
77a138cc
...
@@ -117,7 +117,6 @@ async function doRender (req, res, pathname, query, {
...
@@ -117,7 +117,6 @@ async function doRender (req, res, pathname, query, {
const
ctx
=
{
err
,
req
,
res
,
pathname
,
query
,
asPath
}
const
ctx
=
{
err
,
req
,
res
,
pathname
,
query
,
asPath
}
const
router
=
new
Router
(
pathname
,
query
,
asPath
)
const
router
=
new
Router
(
pathname
,
query
,
asPath
)
const
props
=
await
loadGetInitialProps
(
App
,
{
Component
,
router
,
ctx
})
const
props
=
await
loadGetInitialProps
(
App
,
{
Component
,
router
,
ctx
})
const
devFiles
=
buildManifest
.
devFiles
const
files
=
[
const
files
=
[
...
new
Set
([
...
new
Set
([
...
getPageFiles
(
buildManifest
,
normalizedPagePath
),
...
getPageFiles
(
buildManifest
,
normalizedPagePath
),
...
@@ -200,7 +199,6 @@ async function doRender (req, res, pathname, query, {
...
@@ -200,7 +199,6 @@ async function doRender (req, res, pathname, query, {
dir
,
dir
,
staticMarkup
,
staticMarkup
,
buildManifest
,
buildManifest
,
devFiles
,
files
,
files
,
dynamicImports
,
dynamicImports
,
assetPrefix
,
// We always pass assetPrefix as a top level property since _document needs it to render, even though the client side might not need it
assetPrefix
,
// We always pass assetPrefix as a top level property since _document needs it to render, even though the client side might not need it
...
...
packages/next/build/webpack.js
View file @
77a138cc
...
@@ -19,7 +19,6 @@ import ChunkNamesPlugin from './webpack/plugins/chunk-names-plugin'
...
@@ -19,7 +19,6 @@ import ChunkNamesPlugin from './webpack/plugins/chunk-names-plugin'
import
{
ReactLoadablePlugin
}
from
'./webpack/plugins/react-loadable-plugin'
import
{
ReactLoadablePlugin
}
from
'./webpack/plugins/react-loadable-plugin'
import
{
SERVER_DIRECTORY
,
CLIENT_STATIC_FILES_RUNTIME_WEBPACK
,
CLIENT_STATIC_FILES_RUNTIME_MAIN
}
from
'next-server/constants'
import
{
SERVER_DIRECTORY
,
CLIENT_STATIC_FILES_RUNTIME_WEBPACK
,
CLIENT_STATIC_FILES_RUNTIME_MAIN
}
from
'next-server/constants'
import
{
NEXT_PROJECT_ROOT
,
NEXT_PROJECT_ROOT_NODE_MODULES
,
NEXT_PROJECT_ROOT_DIST
,
DEFAULT_PAGES_DIR
}
from
'../lib/constants'
import
{
NEXT_PROJECT_ROOT
,
NEXT_PROJECT_ROOT_NODE_MODULES
,
NEXT_PROJECT_ROOT_DIST
,
DEFAULT_PAGES_DIR
}
from
'../lib/constants'
import
AutoDllPlugin
from
'autodll-webpack-plugin'
import
TerserPlugin
from
'terser-webpack-plugin'
import
TerserPlugin
from
'terser-webpack-plugin'
// The externals config makes sure that
// The externals config makes sure that
...
@@ -233,22 +232,6 @@ export default async function getBaseWebpackConfig (dir: string, {dev = false, i
...
@@ -233,22 +232,6 @@ export default async function getBaseWebpackConfig (dir: string, {dev = false, i
].
filter
(
Boolean
)
].
filter
(
Boolean
)
},
},
plugins
:
[
plugins
:
[
// Precompile react / react-dom for development, speeding up webpack
dev
&&
!
isServer
&&
new
AutoDllPlugin
({
filename
:
'[name]_[hash].js'
,
path
:
'./static/development/dll'
,
context
:
dir
,
entry
:
{
dll
:
[
'react'
,
'react-dom'
]
},
config
:
{
mode
:
webpackMode
,
resolve
:
resolveConfig
}
}),
// This plugin makes sure `output.filename` is used for entry chunks
// This plugin makes sure `output.filename` is used for entry chunks
new
ChunkNamesPlugin
(),
new
ChunkNamesPlugin
(),
!
isServer
&&
new
ReactLoadablePlugin
(),
!
isServer
&&
new
ReactLoadablePlugin
(),
...
...
packages/next/pages/_document.js
View file @
77a138cc
...
@@ -191,12 +191,11 @@ export class NextScript extends Component {
...
@@ -191,12 +191,11 @@ export class NextScript extends Component {
}
}
render
()
{
render
()
{
const
{
staticMarkup
,
assetPrefix
,
devFiles
,
__NEXT_DATA__
}
=
this
.
context
.
_documentProps
const
{
staticMarkup
,
assetPrefix
,
__NEXT_DATA__
}
=
this
.
context
.
_documentProps
const
{
page
,
pathname
,
buildId
}
=
__NEXT_DATA__
const
{
page
,
pathname
,
buildId
}
=
__NEXT_DATA__
const
pagePathname
=
getPagePathname
(
pathname
)
const
pagePathname
=
getPagePathname
(
pathname
)
return
<
Fragment
>
return
<
Fragment
>
{
devFiles
?
devFiles
.
map
((
file
)
=>
<
script
key
=
{
file
}
src
=
{
`
${
assetPrefix
}
/_next/
${
file
}
`
}
nonce
=
{
this
.
props
.
nonce
}
/>
)
: null
}
{
staticMarkup
?
null
:
<
script
nonce
=
{
this
.
props
.
nonce
}
dangerouslySetInnerHTML
=
{{
{
staticMarkup
?
null
:
<
script
nonce
=
{
this
.
props
.
nonce
}
dangerouslySetInnerHTML
=
{{
__html
:
NextScript
.
getInlineScriptSource
(
this
.
context
.
_documentProps
)
__html
:
NextScript
.
getInlineScriptSource
(
this
.
context
.
_documentProps
)
}}
/>
}
}}
/>
}
...
...
test/integration/basic/test/rendering.js
View file @
77a138cc
...
@@ -187,10 +187,6 @@ export default function ({ app }, suiteName, render, fetch, appPort) {
...
@@ -187,10 +187,6 @@ export default function ({ app }, suiteName, render, fetch, appPort) {
resources
.
push
(
'/_next/'
+
item
)
resources
.
push
(
'/_next/'
+
item
)
}
}
for
(
const
item
of
buildManifest
.
devFiles
)
{
resources
.
push
(
'/_next/'
+
item
)
}
const
responses
=
await
Promise
.
all
(
resources
.
map
((
resource
)
=>
fetch
(
resource
)))
const
responses
=
await
Promise
.
all
(
resources
.
map
((
resource
)
=>
fetch
(
resource
)))
responses
.
forEach
((
res
)
=>
{
responses
.
forEach
((
res
)
=>
{
...
...
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