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
cb635dd9
Commit
cb635dd9
authored
May 02, 2017
by
Dieter Luypaert
Committed by
Arunoda Susiripala
May 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use configured distDir where required (#1816)
parent
605e739f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
index.js
server/index.js
+1
-1
render.js
server/render.js
+2
-1
No files found.
server/index.js
View file @
cb635dd9
...
...
@@ -131,7 +131,7 @@ export default class Server {
return
await
renderScriptError
(
req
,
res
,
'/_error'
,
error
,
customFields
,
this
.
renderOpts
)
}
const
p
=
join
(
this
.
dir
,
'.next/bundles/pages/_error.js'
)
const
p
=
join
(
this
.
dir
,
`
${
this
.
dist
}
/bundles/pages/_error.js`
)
await
this
.
serveStatic
(
req
,
res
,
p
)
},
...
...
server/render.js
View file @
cb635dd9
...
...
@@ -109,7 +109,8 @@ async function doRender (req, res, pathname, query, {
export
async
function
renderScript
(
req
,
res
,
page
,
opts
)
{
try
{
const
path
=
join
(
opts
.
dir
,
'.next'
,
'bundles'
,
'pages'
,
page
)
const
dist
=
getConfig
(
opts
.
dir
).
distDir
const
path
=
join
(
opts
.
dir
,
dist
,
'bundles'
,
'pages'
,
page
)
const
realPath
=
await
resolvePath
(
path
)
await
serveStatic
(
req
,
res
,
realPath
)
}
catch
(
err
)
{
...
...
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