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
a2accb22
Unverified
Commit
a2accb22
authored
Mar 22, 2022
by
JJ Kasper
Committed by
GitHub
Mar 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update trace ignore check to check reasons correctly (#35511)
parent
c2619247
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
next-trace-entrypoints-plugin.ts
...xt/build/webpack/plugins/next-trace-entrypoints-plugin.ts
+3
-1
index.js
test/integration/production/pages/api/index.js
+3
-3
index.test.js
test/integration/production/test/index.test.js
+1
-1
No files found.
packages/next/build/webpack/plugins/next-trace-entrypoints-plugin.ts
View file @
a2accb22
...
@@ -365,7 +365,9 @@ export class TraceEntryPointsPlugin implements webpack5.WebpackPluginInstance {
...
@@ -365,7 +365,9 @@ export class TraceEntryPointsPlugin implements webpack5.WebpackPluginInstance {
// static image imports, CSS imports
// static image imports, CSS imports
file
=
nodePath
.
join
(
this
.
tracingRoot
,
file
)
file
=
nodePath
.
join
(
this
.
tracingRoot
,
file
)
const
depMod
=
depModMap
.
get
(
file
)
const
depMod
=
depModMap
.
get
(
file
)
const
isAsset
=
reasons
.
get
(
file
)?.
type
.
includes
(
'asset'
)
const
isAsset
=
reasons
.
get
(
nodePath
.
relative
(
this
.
tracingRoot
,
file
))
?.
type
.
includes
(
'asset'
)
return
(
return
(
!
isAsset
&&
!
isAsset
&&
...
...
test/integration/production/pages/api/index.js
View file @
a2accb22
import
fs
from
'fs'
import
fs
from
'fs'
import
path
from
'path'
import
path
from
'path'
import
data
from
'../../static/hello.json
'
import
css
from
'../../components/logo/logo.module.css
'
export
default
(
req
,
res
)
=>
{
export
default
(
req
,
res
)
=>
{
console
.
log
({
console
.
log
({
importedData
:
data
,
importedData
:
css
,
fsLoadedData
:
fs
.
readFileSync
(
fsLoadedData
:
fs
.
readFileSync
(
path
.
join
(
process
.
cwd
(),
'
static'
,
'hello.json
'
),
path
.
join
(
process
.
cwd
(),
'
components'
,
'logo'
,
'logo.module.css
'
),
'utf8'
'utf8'
),
),
})
})
...
...
test/integration/production/test/index.test.js
View file @
a2accb22
...
@@ -225,7 +225,7 @@ describe('Production Usage', () => {
...
@@ -225,7 +225,7 @@ describe('Production Usage', () => {
},
},
{
{
page
:
'/api'
,
page
:
'/api'
,
tests
:
[
/webpack-runtime
\.
js/
,
/
static
\/
hello
\.
json
/
],
tests
:
[
/webpack-runtime
\.
js/
,
/
\/
logo
\.
module
\.
css
/
],
notTests
:
[
notTests
:
[
/next
\/
dist
\/
server
\/
next
\.
js/
,
/next
\/
dist
\/
server
\/
next
\.
js/
,
/next
\/
dist
\/
bin/
,
/next
\/
dist
\/
bin/
,
...
...
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