From 1cff0065441552527ce7faa63c435150d86135ea Mon Sep 17 00:00:00 2001 From: Musa Date: Mon, 8 Dec 2025 14:30:46 -0800 Subject: [PATCH] feat: Turbopack issue --- apps/www/next.config.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/apps/www/next.config.ts b/apps/www/next.config.ts index 5d58dd20..d2f2d4e4 100644 --- a/apps/www/next.config.ts +++ b/apps/www/next.config.ts @@ -11,6 +11,30 @@ const nextConfig: NextConfig = { // Ensure workspace packages are handled correctly externalDir: true, }, + // Webpack config for production builds + webpack: (config, { isServer }) => { + // Ensure proper resolution of dependencies in monorepo + config.resolve.modules = [ + ...(config.resolve.modules || []), + "node_modules", + "../../node_modules", + ]; + + if (!isServer) { + config.resolve.fallback = { + ...config.resolve.fallback, + fs: false, + }; + } + return config; + }, + // Turbopack config for dev mode (Next.js 16 default) + turbopack: { + resolveAlias: { + // Turbopack should handle monorepo resolution automatically + // but we can add specific aliases if needed + }, + }, images: { remotePatterns: [ {