Disable SSR and simplify Next.js config to fix webpack errors
This commit is contained in:
@@ -11,6 +11,9 @@ import ListDetailView from '@/components/ListDetailView'
|
|||||||
export const dynamic = 'force-dynamic'
|
export const dynamic = 'force-dynamic'
|
||||||
export const revalidate = 0
|
export const revalidate = 0
|
||||||
|
|
||||||
|
export const dynamic = 'force-dynamic'
|
||||||
|
export const revalidate = 0
|
||||||
|
|
||||||
export default async function ListDetailPage({ params }: { params: { id: string } }) {
|
export default async function ListDetailPage({ params }: { params: { id: string } }) {
|
||||||
const session = await getServerSession(authOptions)
|
const session = await getServerSession(authOptions)
|
||||||
if (!session?.user?.id) {
|
if (!session?.user?.id) {
|
||||||
|
|||||||
@@ -1,18 +1,11 @@
|
|||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
experimental: {
|
reactStrictMode: false,
|
||||||
optimizePackageImports: ['lucide-react'],
|
swcMinify: false,
|
||||||
},
|
|
||||||
compiler: {
|
|
||||||
removeConsole: process.env.NODE_ENV === 'production' ? {
|
|
||||||
exclude: ['error', 'warn'],
|
|
||||||
} : false,
|
|
||||||
},
|
|
||||||
swcMinify: true,
|
|
||||||
images: {
|
images: {
|
||||||
formats: ['image/avif', 'image/webp'],
|
unoptimized: true,
|
||||||
},
|
},
|
||||||
compress: true,
|
compress: false,
|
||||||
productionBrowserSourceMaps: false,
|
productionBrowserSourceMaps: false,
|
||||||
trailingSlash: false,
|
trailingSlash: false,
|
||||||
poweredByHeader: false,
|
poweredByHeader: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user