-
SummaryI'm experimenting with ways to improve build performance in webpack, and I came across the suggestion to disable
webpack: (config: Configuration, { isServer }) => {
if (isServer) {
config.plugins = (config.plugins as WebpackPluginInstance[]).filter(
(plugin) => plugin.constructor?.name !== 'TraceEntryPointsPlugin'
);
}
return config;
} This removed 92s of build time, but I'm unsure as to the downsides of this. Is this feature the Next.js 12 Output File Tracing feature?
Does that mean that this plugin can be disabled for performance at the cost of knowing which files are absolutely needed for the build? I also wonder whether simple self-hosted Next.js setups without any integration with the tracing also would get something out of disabling this plugin... 🤔 With
$ rm -r .next && time npm run build
...
npm run build 562.03s user 188.86s system 169% cpu 7:22.23 total Without
$ rm -r .next && time npm run build
...
npm run build 350.96s user 168.63s system 154% cpu 5:36.00 total Additional information-- ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
❓Should you disable TraceEntryPointsPlugin? |
Beta Was this translation helpful? Give feedback.
-
@mischnic has confirmed a few things offline, thanks! 🙌
|
Beta Was this translation helpful? Give feedback.
@mischnic has confirmed a few things offline, thanks! 🙌