Files
DanDing1Todo_Web/next.config.ts
Mr.Xia 2c4549ad79
Some checks failed
CI / lint (push) Has been cancelled
CI / build (push) Has been cancelled
fa
2026-02-26 21:29:54 +08:00

33 lines
675 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// 输出优化standalone 模式可大幅减少 Docker 镜像大小
output: 'standalone',
// 编译优化
compiler: {
// 移除 console.log (生产环境)
removeConsole: process.env.NODE_ENV === 'production',
},
// 性能优化
reactStrictMode: true,
// 压缩优化
compress: true,
// 图片优化
images: {
formats: ['image/webp'],
minimumCacheTTL: 60,
},
// 实验性功能
experimental: {
// 优化包导入
optimizePackageImports: ['lucide-react', 'framer-motion', 'recharts', 'date-fns'],
},
};
export default nextConfig;