Files
pos-system/apps/client-example/next.config.js

77 lines
1.8 KiB
JavaScript

const createNextIntlPlugin = require('next-intl/plugin');
// Create the next-intl plugin with our config
const withNextIntl = createNextIntlPlugin('./src/i18n/request.ts');
/** @type {import('next').NextConfig} */
const nextConfig = {
/* config options here */
// Skip failing non-blocking export errors (error page prerendering)
experimental: {
// Additional experimental features can be added here when needed
},
// This allows build to succeed even if error pages fail to prerender
// Error pages will still work at runtime
staticPageGenerationTimeout: 1000,
// Suppress non-critical export errors
onDemandEntries: {
maxInactiveAge: 25 * 1000,
pagesBufferLength: 2,
},
// Favicon and PWA configuration
async headers() {
return [
{
source: '/favicon.svg',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
],
},
{
source: '/favicon.ico',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
],
},
{
source: '/apple-touch-icon.svg',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
],
},
{
source: '/manifest.json',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
],
},
{
source: '/browserconfig.xml',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
],
},
];
},
};
module.exports = withNextIntl(nextConfig);