From f18f9b85ee0fba9743df18860e4782682393b670 Mon Sep 17 00:00:00 2001 From: manNomi Date: Wed, 27 May 2026 01:38:36 +0900 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20next=2016=20turbopack=20=EB=B9=8C?= =?UTF-8?q?=EB=93=9C=20=EC=A0=84=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/next.config.mjs | 8 ++++++++ apps/web/package.json | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index b35edd0b..9435aa90 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -19,6 +19,14 @@ const imageRemotePatterns = [ /** @type {import('next').NextConfig} */ const nextConfig = { transpilePackages: ["@solid-connect/ai-inspector"], + turbopack: { + rules: { + "*.svg": { + loaders: ["@svgr/webpack"], + as: "*.js", + }, + }, + }, images: { unoptimized: true, remotePatterns: imageRemotePatterns, diff --git a/apps/web/package.json b/apps/web/package.json index aa6ed880..d2819c39 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "dev": "next dev", - "build": "next build --webpack", + "build": "next build", "start": "next start", "lint": "biome check --write .", "lint:check": "biome check .", @@ -13,7 +13,7 @@ "typecheck": "tsc --noEmit", "typecheck:ci": "tsc --noEmit -p tsconfig.ci.json", "ci:check": "pnpm run lint:check && pnpm run typecheck:ci", - "analyze": "ANALYZE=true next build --webpack" + "analyze": "ANALYZE=true next build" }, "dependencies": { "@hookform/resolvers": "^5.2.2", From f548ec516ecab0fd4c7fd2fb6d592937b803a5f6 Mon Sep 17 00:00:00 2001 From: manNomi Date: Wed, 27 May 2026 01:52:58 +0900 Subject: [PATCH 2/3] =?UTF-8?q?chore:=20=EB=B2=88=EB=93=A4=20=EB=B6=84?= =?UTF-8?q?=EC=84=9D=20=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=20webpack=20?= =?UTF-8?q?=EC=9C=A0=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/package.json b/apps/web/package.json index d2819c39..56481ee3 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -13,7 +13,7 @@ "typecheck": "tsc --noEmit", "typecheck:ci": "tsc --noEmit -p tsconfig.ci.json", "ci:check": "pnpm run lint:check && pnpm run typecheck:ci", - "analyze": "ANALYZE=true next build" + "analyze": "ANALYZE=true next build --webpack" }, "dependencies": { "@hookform/resolvers": "^5.2.2", From 2ae93b04e4a3df273f10d51e74a8eb6bfc316226 Mon Sep 17 00:00:00 2001 From: manNomi Date: Wed, 27 May 2026 15:09:53 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore:=20=EC=9B=B9=20=EB=B2=88=EB=93=A4=20?= =?UTF-8?q?=EB=B6=84=EC=84=9D=EC=9A=A9=20webpack=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/next.config.mjs | 57 ++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index 9435aa90..6a940991 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -3,8 +3,11 @@ import bundleAnalyzer from "@next/bundle-analyzer"; import { withSentryConfig } from "@sentry/nextjs"; +const shouldRunBundleAnalyzer = process.env.ANALYZE === "true"; +const svgComponentLoaders = ["@svgr/webpack"]; + const withBundleAnalyzer = bundleAnalyzer({ - enabled: process.env.ANALYZE === "true", + enabled: shouldRunBundleAnalyzer, }); const imageRemotePatterns = [ @@ -22,7 +25,7 @@ const nextConfig = { turbopack: { rules: { "*.svg": { - loaders: ["@svgr/webpack"], + loaders: svgComponentLoaders, as: "*.js", }, }, @@ -56,31 +59,35 @@ const nextConfig = { typescript: { ignoreBuildErrors: true, }, - webpack: (config) => { - // CSS 최적화 - ensure nested objects exist - if (!config.optimization) { - config.optimization = {}; - } - if (!config.optimization.splitChunks) { - config.optimization.splitChunks = {}; - } - if (!config.optimization.splitChunks.cacheGroups) { - config.optimization.splitChunks.cacheGroups = {}; - } + ...(shouldRunBundleAnalyzer + ? { + webpack: (config) => { + // Bundle analyzer still runs through webpack because it is webpack-plugin based. + if (!config.optimization) { + config.optimization = {}; + } + if (!config.optimization.splitChunks) { + config.optimization.splitChunks = {}; + } + if (!config.optimization.splitChunks.cacheGroups) { + config.optimization.splitChunks.cacheGroups = {}; + } - config.optimization.splitChunks.cacheGroups.styles = { - name: "styles", - test: /\.(css|scss)$/, - chunks: "all", - enforce: true, - }; + config.optimization.splitChunks.cacheGroups.styles = { + name: "styles", + test: /\.(css|scss)$/, + chunks: "all", + enforce: true, + }; - config.module.rules.push({ - test: /\.svg$/, - use: ["@svgr/webpack"], - }); - return config; - }, + config.module.rules.push({ + test: /\.svg$/, + use: svgComponentLoaders, + }); + return config; + }, + } + : {}), }; export default withSentryConfig(