Files
pos-system/apps/web-client/next.config.js
Ho Ngoc Hai c088de53c3 Update dependencies and enhance Tailwind CSS configuration for web applications
- Added new dependencies including clsx, lucide-react, recharts, and various Radix UI components to improve UI functionality.
- Upgraded Tailwind CSS to version 4.0.0 and updated configuration to utilize CSS variables for theming and responsive design.
- Introduced global styles and improved accessibility features in the layout and components.
- Removed outdated login page and refactored authentication store for better state management.
- Enhanced API service with additional authentication methods and improved error handling.

These changes aim to modernize the web applications and improve user experience through better design and functionality.
2026-01-02 09:41:40 +07:00

88 lines
2.7 KiB
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
// EN: Enable React strict mode for development warnings
// VI: Bật React strict mode để hiển thị warnings trong development
reactStrictMode: true,
// EN: Output standalone build for container deployment
// VI: Output build standalone để deploy trong container
output: 'standalone',
// EN: Image optimization configuration
// VI: Cấu hình tối ưu hình ảnh
images: {
// EN: Enable image optimization with WebP/AVIF formats
// VI: Bật tối ưu hình ảnh với định dạng WebP/AVIF
formats: ['image/avif', 'image/webp'],
// EN: Remote image domains (if needed)
// VI: Các domain hình ảnh từ xa (nếu cần)
remotePatterns: [
{
protocol: 'https',
hostname: '**',
},
],
// EN: Device sizes for responsive images
// VI: Kích thước thiết bị cho hình ảnh responsive
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
// EN: Image sizes for different breakpoints
// VI: Kích thước hình ảnh cho các breakpoint khác nhau
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
},
// EN: Environment variables exposed to the browser
// VI: Biến môi trường được expose cho browser
env: {
// EN: Public API URL for client-side API calls
// VI: URL API public để gọi API từ client-side
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || 'http://localhost/api/v1',
},
// EN: Headers for caching static assets (1 year) - Performance optimization
// VI: Headers cho caching static assets (1 năm) - Tối ưu hiệu suất
async headers() {
return [
{
source: '/_next/static/:path*',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
],
},
{
source: '/images/:path*',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
],
},
];
},
// EN: Compress responses - Performance optimization
// VI: Nén responses - Tối ưu hiệu suất
compress: true,
// EN: Ignore ESLint errors during build (linting should be done separately)
// VI: Bỏ qua lỗi ESLint trong build (linting nên được chạy riêng)
eslint: {
ignoreDuringBuilds: true,
},
// EN: Remove console.log in production
// VI: Xóa console.log trong production
...(process.env.NODE_ENV === 'production' && {
compiler: {
removeConsole: {
exclude: ['error', 'warn'],
},
},
}),
};
module.exports = nextConfig;