Skip to content

Commit

Permalink
Only pass issuerModule when it's available
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed Aug 17, 2021
1 parent f8954cf commit 74856ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/next/build/webpack-config.ts
Expand Up @@ -1310,7 +1310,7 @@ export default async function getBaseWebpackConfig(
new BuildStatsPlugin({
distDir,
}),
process.env.TRACE_TARGET && new ProfilingPlugin({ runWebpackSpan }),
new ProfilingPlugin({ runWebpackSpan }),
config.optimizeFonts &&
!dev &&
isServer &&
Expand Down
2 changes: 1 addition & 1 deletion packages/next/build/webpack/plugins/profiling-plugin.ts
Expand Up @@ -101,7 +101,7 @@ export class ProfilingPlugin {
return module.userRequest.split('.').pop()
})()

const issuerModule = compilation.moduleGraph.getIssuer(module)
const issuerModule = compilation?.moduleGraph?.getIssuer(module)

const span = trace(
`build-module${moduleType ? `-${moduleType}` : ''}`,
Expand Down

0 comments on commit 74856ea

Please sign in to comment.