45 lines
859 B
JavaScript
45 lines
859 B
JavaScript
/**
|
|
* @type {import('next').NextConfig}
|
|
*/
|
|
import withSerwistInit from '@serwist/next';
|
|
|
|
const output = process.env.NODE_ENV === 'production' ? 'export' : 'standalone';
|
|
|
|
// Configure Serwist for service worker generation
|
|
const withSerwist = withSerwistInit({
|
|
swSrc: 'src/sw.ts',
|
|
swDest: 'public/sw.js',
|
|
disable: process.env.NODE_ENV === 'development',
|
|
});
|
|
|
|
const nextConfig = {
|
|
trailingSlash: true,
|
|
distDir: 'build',
|
|
output,
|
|
basePath: '',
|
|
devIndicators: {
|
|
position: 'bottom-left',
|
|
},
|
|
typescript: {
|
|
ignoreBuildErrors: true,
|
|
},
|
|
eslint: {
|
|
ignoreDuringBuilds: true,
|
|
},
|
|
images: {
|
|
unoptimized: true,
|
|
remotePatterns: [
|
|
{
|
|
protocol: 'https',
|
|
hostname: '**',
|
|
},
|
|
],
|
|
localPatterns: [
|
|
{
|
|
pathname: '/api/**',
|
|
},
|
|
],
|
|
},
|
|
};
|
|
|
|
export default withSerwist(nextConfig); |