60 lines
1.1 KiB
JavaScript
60 lines
1.1 KiB
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
reactStrictMode: true,
|
|
output: 'standalone',
|
|
|
|
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;
|