diff --git a/keep-notes/next.config.ts b/keep-notes/next.config.ts index c9cba6d..cbf9bca 100644 --- a/keep-notes/next.config.ts +++ b/keep-notes/next.config.ts @@ -11,8 +11,17 @@ const nextConfig: NextConfig = { // Enable standalone output for Docker output: 'standalone', - // Disable Turbopack for Docker builds - use Webpack instead - // Turbopack has issues with Tailwind CSS 4 in Docker containers + // Webpack config (needed for PWA plugin) + webpack: (config, { isServer }) => { + // Fixes npm packages that depend on `fs` module + if (!isServer) { + config.resolve.fallback = { + ...config.resolve.fallback, + fs: false, + }; + } + return config; + }, // Optimize for production reactStrictMode: true, diff --git a/keep-notes/package.json b/keep-notes/package.json index 82ae780..179eaa4 100644 --- a/keep-notes/package.json +++ b/keep-notes/package.json @@ -5,7 +5,7 @@ "scripts": { "dev": "set TURBOPACK=0&& next dev", "dev:turbo": "next dev", - "build": "next build", + "build": "next build --webpack", "start": "next start", "db:generate": "prisma generate", "test": "playwright test",