Skip to content

Commit

Permalink
dev: set some next settings to improve build times (#998)
Browse files Browse the repository at this point in the history
* dev: enable experimental parallel traces to improve build times somewhat

* dev: disable webpack cache on build for even more gain

* fix: reintroduce webpackbuildworker etc
  • Loading branch information
tefkah authored Feb 26, 2025
1 parent 07ab053 commit 626e97e
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions core/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,22 @@ const nextConfig = {
],
experimental: {
optimizePackageImports: ["@icons-pack/react-simple-icons", "lucide-react"],
webpackBuildWorker: true,
parallelServerBuildTraces: true,
},
// open telemetry cries a lot during build, don't think it's serious
// https://github.com/open-telemetry/opentelemetry-js/issues/4173
// webpack: (config, { buildId, dev, isServer, defaultLoaders, nextRuntime, webpack }) => {
// if (isServer) {
// config.ignoreWarnings = [{ module: /opentelemetry/ }];
// }
// return config;
// },
webpack: (config, { buildId, dev, isServer, defaultLoaders, nextRuntime, webpack }) => {
if (config.cache && !dev) {
config.cache = Object.freeze({
type: "memory",
});
}
if (isServer) {
config.ignoreWarnings = [{ module: /opentelemetry/ }];
}
return config;
},
};

const modifiedConfig = withPreconstruct(
Expand Down

0 comments on commit 626e97e

Please sign in to comment.