- Relocated `i18n` configuration files to `src/lib/i18n` for better organization. - Removed obsolete `request.ts` and `routing.ts` files, simplifying `i18n` setup within the project. - Added extensive tests for `i18n/utils` to validate locale-related utilities, including locale name, native name, and flag retrieval. - Introduced a detailed `I18N_IMPLEMENTATION_PLAN.md` to document implementation phases, decisions, and recommendations for future extensions. - Enhanced TypeScript definitions and modularity across i18n utilities for improved developer experience.
30 lines
758 B
TypeScript
Executable File
30 lines
758 B
TypeScript
Executable File
import type { NextConfig } from 'next';
|
|
import createNextIntlPlugin from 'next-intl/plugin';
|
|
|
|
// Initialize next-intl plugin with i18n request config path
|
|
const withNextIntl = createNextIntlPlugin('./src/lib/i18n/request.ts');
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: 'standalone',
|
|
// Ensure we can connect to the backend in Docker
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
source: '/api/:path*',
|
|
destination: 'http://backend:8000/:path*',
|
|
},
|
|
];
|
|
},
|
|
// ESLint configuration
|
|
eslint: {
|
|
ignoreDuringBuilds: false,
|
|
dirs: ['src'],
|
|
},
|
|
// Production optimizations
|
|
reactStrictMode: true,
|
|
// Note: swcMinify is default in Next.js 15
|
|
};
|
|
|
|
// Wrap config with next-intl plugin
|
|
export default withNextIntl(nextConfig);
|