prmbr-image-mksaas/next.config.ts

73 lines
2.0 KiB
TypeScript

import { createMDX } from 'fumadocs-mdx/next';
import type { NextConfig } from 'next';
import createNextIntlPlugin from 'next-intl/plugin';
/**
* https://nextjs.org/docs/app/api-reference/config/next-config-js
*/
const nextConfig: NextConfig = {
// Docker standalone output
...(process.env.DOCKER_BUILD === 'true' && { output: 'standalone' }),
/* config options here */
devIndicators: false,
// https://nextjs.org/docs/architecture/nextjs-compiler#remove-console
// Remove all console.* calls in production only
compiler: {
// removeConsole: process.env.NODE_ENV === 'production',
},
images: {
// https://vercel.com/docs/image-optimization/managing-image-optimization-costs#minimizing-image-optimization-costs
// https://nextjs.org/docs/app/api-reference/components/image#unoptimized
// vercel has limits on image optimization, 1000 images per month
unoptimized: process.env.DISABLE_IMAGE_OPTIMIZATION === 'true',
remotePatterns: [
{
protocol: 'https',
hostname: 'avatars.githubusercontent.com',
},
{
protocol: 'https',
hostname: 'lh3.googleusercontent.com',
},
{
protocol: 'https',
hostname: 'randomuser.me',
},
{
protocol: 'https',
hostname: 'res.cloudinary.com',
},
{
protocol: 'https',
hostname: 'ik.imagekit.io',
},
{
protocol: 'https',
hostname: 'html.tailus.io',
},
{
protocol: 'https',
hostname: 'service.firecrawl.dev',
},
],
},
};
/**
* You can specify the path to the request config file or use the default one (@/i18n/request.ts)
*
* https://next-intl.dev/docs/getting-started/app-router/with-i18n-routing#next-config
*/
const withNextIntl = createNextIntlPlugin();
/**
* https://fumadocs.dev/docs/ui/manual-installation
* https://fumadocs.dev/docs/mdx/plugin
*/
const withMDX = createMDX();
export default withMDX(withNextIntl(nextConfig));