fix: add --webpack flag for Next.js 16 Turbopack compatibility
- 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
This commit is contained in:
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
/// <reference types="next" />
|
/// <reference types="next" />
|
||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
import "./.next/types/routes.d.ts";
|
import "./.next/dev/types/routes.d.ts";
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import withSerwistInit from '@serwist/next'
|
|||||||
const withSerwist = withSerwistInit({
|
const withSerwist = withSerwistInit({
|
||||||
swSrc: 'src/sw.ts',
|
swSrc: 'src/sw.ts',
|
||||||
swDest: 'public/sw.js',
|
swDest: 'public/sw.js',
|
||||||
|
disable: process.env.NODE_ENV === 'development',
|
||||||
})
|
})
|
||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
|
|||||||
+2
-2
@@ -3,8 +3,8 @@
|
|||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev --webpack",
|
||||||
"build": "next build",
|
"build": "next build --webpack",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "eslint"
|
"lint": "eslint"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user