Files
awesome-app/next.config.js
valknarness b63592f153 a new start
2025-10-25 16:09:02 +02:00

59 lines
1.0 KiB
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
experimental: {
optimizeCss: true,
serverActions: {
bodySizeLimit: '2mb',
},
},
// PWA configuration
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
net: false,
tls: false,
};
}
return config;
},
async headers() {
return [
{
source: '/worker.js',
headers: [
{
key: 'Service-Worker-Allowed',
value: '/',
},
{
key: 'Cache-Control',
value: 'public, max-age=0, must-revalidate',
},
],
},
];
},
images: {
formats: ['image/avif', 'image/webp'],
remotePatterns: [
{
protocol: 'https',
hostname: 'raw.githubusercontent.com',
},
{
protocol: 'https',
hostname: 'github.com',
},
],
},
};
module.exports = nextConfig;