magicui
/
next.config.js
46 строк · 1.2 Кб
1const { withContentlayer } = require("next-contentlayer");2
3/** @type {import('next').NextConfig} */
4const nextConfig = {5output: process.env.NODE_ENV === "production" ? "standalone" : undefined,6reactStrictMode: true,7swcMinify: true,8productionBrowserSourceMaps: true,9experimental: {10optimizeCss: true,11},12compiler: {13// Remove console.log from production except for error logs14removeConsole:15process.env.NODE_ENV === "production" ? { exclude: ["error"] } : false,16},17images: {18domains: ["localhost", "cdn.magicui.design"],19},20async redirects() {21return [22{23source: "/discord",24destination: "https://discord.gg/X4BBMBjHNf",25permanent: true,26},27{28source: "/components",29destination: "/docs/components/animated-beam",30permanent: true,31},32{33source: "/components/:path*",34destination: "/docs/components/:path*",35permanent: true,36},37{38source: "/docs/components",39destination: "/docs/components/animated-beam",40permanent: true,41},42];43},44};45
46module.exports = withContentlayer(nextConfig);47