Skip to content

Commit

Permalink
dev: disable webpack cache on build for even more gain
Browse files Browse the repository at this point in the history
  • Loading branch information
tefkah committed Feb 26, 2025
1 parent ad4f0f0 commit 6a58b87
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions core/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,20 @@ 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 6a58b87

Please sign in to comment.