mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Do not include /_document.js when running 'next export'
This commit is contained in:
parent
880eb4caff
commit
4be25270c6
|
@ -94,6 +94,13 @@ function copyPages (nextDir, outDir, buildId) {
|
|||
const fullFilePath = `${root}${sep}${filename}`
|
||||
const relativeFilePath = fullFilePath.replace(nextBundlesDir, '')
|
||||
|
||||
// We should not expose this page to the client side since
|
||||
// it has no use in the client side.
|
||||
if (relativeFilePath === '/_document.js') {
|
||||
next()
|
||||
return
|
||||
}
|
||||
|
||||
let destFilePath = null
|
||||
if (/index\.js$/.test(filename)) {
|
||||
destFilePath = join(outDir, '_next', buildId, 'page', relativeFilePath)
|
||||
|
|
Loading…
Reference in a new issue