c2d054e705
- serwist/next requires webpack, Next.js 16 defaults to Turbopack - dev/build scripts now use --webpack flag - Disable serwist in dev mode to avoid warnings
15 lines
369 B
TypeScript
15 lines
369 B
TypeScript
import type { NextConfig } from 'next'
|
|
import withSerwistInit from '@serwist/next'
|
|
|
|
const withSerwist = withSerwistInit({
|
|
swSrc: 'src/sw.ts',
|
|
swDest: 'public/sw.js',
|
|
disable: process.env.NODE_ENV === 'development',
|
|
})
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: process.env.NETLIFY === 'true' ? undefined : 'standalone',
|
|
}
|
|
|
|
export default withSerwist(nextConfig)
|