I have a mid sized app for video editing and its taking really long to compile.
OS: Windows x64 Intel i5 processor
Nextjs Version: 14.0.3
Below is my Nextjs config
import { createRequire } from "module";
const require = createRequire(import.meta.url);
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: false,
});
await import("./src/env.js");
/** @type {import('next').NextConfig} /
const nextConfig = {
crossOrigin: "anonymous",
async headers() {
return [
{
source: "/public/:path",
headers: [
{
key: "Cache-Control",
value: "public, max-age=31536000, immutable",
},
],
},
];
},
swcMinify: true,
typescript: {
ignoreBuildErrors: true,
},
eslint: {
ignoreDuringBuilds: true,
},
reactStrictMode: false,
experimental: {
serverSourceMaps: false,
webpackBuildWorker: true,
},
webpack: (
config,
{ buildId, dev, isServer, defaultLoaders, nextRuntime, webpack },
) => {
config.cache = false;
return config;
},
};
export default withBundleAnalyzer(nextConfig);