Files
fad-trade-next/next.config.mjs
砂糖 b52fce96d2 feat: 更新产品图片资源并优化本地化配置
- 将远程图片资源迁移至本地public/images目录
- 更新所有语言版本的产品和应用的图片引用路径
- 调整next.config.mjs输出配置为export模式
- 优化首页组件图片引用和轮播按钮显示
- 同步更新多语言JSON文件中的图片路径
2026-01-31 16:42:34 +08:00

31 lines
622 B
JavaScript

import createNextIntlPlugin from "next-intl/plugin";
const withNextIntl = createNextIntlPlugin();
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "export",
// output: "standalone",
images: {
remotePatterns: [
...(process.env.R2_PUBLIC_URL
? [
{
hostname: process.env.R2_PUBLIC_URL.replace("https://", ""),
},
]
: []),
],
},
compiler: {
removeConsole:
process.env.NODE_ENV === "production"
? {
exclude: ["error"],
}
: false,
},
};
export default withNextIntl(nextConfig);