Unverified Commit a71addf2 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Ensure initial imports are included in traces correctly (#29437)

parent bb8434c1
...@@ -277,7 +277,7 @@ export class TraceEntryPointsPlugin implements webpack.Plugin { ...@@ -277,7 +277,7 @@ export class TraceEntryPointsPlugin implements webpack.Plugin {
} }
collectDependencies(entryMod) collectDependencies(entryMod)
const toTrace: string[] = [entry, ...depModMap.keys()] const toTrace: string[] = [entry]
const entryName = entryNameMap.get(entry)! const entryName = entryNameMap.get(entry)!
const curExtraEntries = additionalEntries.get(entryName) const curExtraEntries = additionalEntries.get(entryName)
......
...@@ -110,6 +110,32 @@ describe('Production Usage', () => { ...@@ -110,6 +110,32 @@ describe('Production Usage', () => {
], ],
notTests: [/node_modules\/react\/cjs\/react\.development\.js/], notTests: [/node_modules\/react\/cjs\/react\.development\.js/],
}, },
{
page: '/index',
tests: [
/webpack-runtime\.js/,
/chunks\/.*?\.js/,
/node_modules\/react\/index\.js/,
/node_modules\/react\/package\.json/,
/node_modules\/react\/cjs\/react\.production\.min\.js/,
/next\/link\.js/,
/next\/dist\/client\/link\.js/,
],
notTests: [/node_modules\/react\/cjs\/react\.development\.js/],
},
{
page: '/counter',
tests: [
/webpack-runtime\.js/,
/chunks\/.*?\.js/,
/node_modules\/react\/index\.js/,
/node_modules\/react\/package\.json/,
/node_modules\/react\/cjs\/react\.production\.min\.js/,
/next\/router\.js/,
/next\/dist\/client\/router\.js/,
],
notTests: [/node_modules\/react\/cjs\/react\.development\.js/],
},
{ {
page: '/next-import', page: '/next-import',
tests: [ tests: [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment