diff --git a/next.config.ts b/next.config.ts index c4728af..58db81e 100644 --- a/next.config.ts +++ b/next.config.ts @@ -19,6 +19,22 @@ const nextConfig: NextConfig = { // }, ] }, + webpack: (config, { dev, isServer }) => { + if (!dev && !isServer) { + config.optimization.minimizer = config.optimization.minimizer || [] + config.optimization.minimizer.push( + new (require('terser-webpack-plugin'))({ + terserOptions: { + format: { + comments: false, + }, + }, + extractComments: false, + }), + ) + } + return config + }, } export default nextConfig diff --git a/package.json b/package.json index 064f055..439c5df 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "@types/react-dom": "^19", "prisma": "^6.7.0", "tailwindcss": "^4", + "terser-webpack-plugin": "^5.3.14", "typescript": "^5" } }