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
9c8aaf9d
Commit
9c8aaf9d
authored
Aug 20, 2019
by
JJ Kasper
Committed by
Joe Haddad
Aug 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build-manifest not removing _app files for modern (#8447)
parent
8bd2e433
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
1 deletion
+42
-1
build-manifest-plugin.ts
packages/next/build/webpack/plugins/build-manifest-plugin.ts
+2
-1
next.config.js
test/integration/chunking-minimal/next.config.js
+6
-0
index.js
test/integration/chunking-minimal/pages/index.js
+1
-0
index.test.js
test/integration/chunking-minimal/test/index.test.js
+33
-0
No files found.
packages/next/build/webpack/plugins/build-manifest-plugin.ts
View file @
9c8aaf9d
...
...
@@ -25,8 +25,9 @@ const generateClientManifest = (
):
string
=>
{
const
clientManifest
:
{
[
s
:
string
]:
string
[]
}
=
{}
const
appDependencies
=
new
Set
(
assetMap
.
pages
[
'/_app'
])
delete
assetMap
.
pages
[
'/_app'
]
Object
.
entries
(
assetMap
.
pages
).
forEach
(([
page
,
dependencies
])
=>
{
if
(
page
===
'/_app'
)
return
// Filter out dependencies in the _app entry, because those will have already
// been loaded by the client prior to a navigation event
const
filteredDeps
=
dependencies
.
filter
(
...
...
test/integration/chunking-minimal/next.config.js
0 → 100644
View file @
9c8aaf9d
module
.
exports
=
{
experimental
:
{
modern
:
true
,
granularChunks
:
true
}
}
test/integration/chunking-minimal/pages/index.js
0 → 100644
View file @
9c8aaf9d
export
default
()
=>
<
p
>
hi
<
/p
>
test/integration/chunking-minimal/test/index.test.js
0 → 100644
View file @
9c8aaf9d
/* eslint-env jest */
/* global jasmine */
import
{
join
}
from
'path'
import
{
readFile
}
from
'fs-extra'
import
{
nextBuild
}
from
'next-test-utils'
jasmine
.
DEFAULT_TIMEOUT_INTERVAL
=
1000
*
60
*
1
const
appDir
=
join
(
__dirname
,
'../'
)
let
buildId
describe
(
'Chunking (minimal)'
,
()
=>
{
beforeAll
(
async
()
=>
{
await
nextBuild
(
appDir
)
buildId
=
await
readFile
(
join
(
appDir
,
'.next/BUILD_ID'
),
'utf8'
)
})
it
(
'should have an empty client-manifest'
,
async
()
=>
{
const
manifest
=
await
readFile
(
join
(
appDir
,
'.next/static'
,
buildId
,
'_buildManifest.js'
),
'utf8'
)
expect
(
manifest
).
not
.
toMatch
(
/
\.
js/
)
})
it
(
'should have an empty modern client-manifest'
,
async
()
=>
{
const
manifest
=
await
readFile
(
join
(
appDir
,
'.next/static'
,
buildId
,
'_buildManifest.module.js'
),
'utf8'
)
expect
(
manifest
).
not
.
toMatch
(
/
\.
js/
)
})
})
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