aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/next.config.mjs
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2026-02-01 19:15:13 +0000
committerMohamed Bassem <me@mbassem.com>2026-02-01 19:15:13 +0000
commit45db6147032071d270fbf2b577a234393247d921 (patch)
treea739af8254efc2f417f27d702472c14782154e4d /apps/web/next.config.mjs
parentbf5c99cb10a0b35b0101bf8f9858c176889a0284 (diff)
downloadkarakeep-45db6147032071d270fbf2b577a234393247d921.tar.zst
fix(web): don't bundle tiktoken in client bundles
Diffstat (limited to 'apps/web/next.config.mjs')
-rw-r--r--apps/web/next.config.mjs7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs
index 5f1c2bf6..136f6a22 100644
--- a/apps/web/next.config.mjs
+++ b/apps/web/next.config.mjs
@@ -1,5 +1,10 @@
+import bundleAnalyzer from "@next/bundle-analyzer";
import pwa from "next-pwa";
+const withBundleAnalyzer = bundleAnalyzer({
+ enabled: process.env.ANALYZE === "true",
+});
+
const withPWA = pwa({
dest: "public",
disable: process.env.NODE_ENV != "production",
@@ -53,4 +58,4 @@ const nextConfig = withPWA({
typescript: { ignoreBuildErrors: true },
});
-export default nextConfig;
+export default withBundleAnalyzer(nextConfig);