diff options
| author | Mohamed Bassem <me@mbassem.com> | 2026-02-01 19:15:13 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2026-02-01 19:15:13 +0000 |
| commit | 45db6147032071d270fbf2b577a234393247d921 (patch) | |
| tree | a739af8254efc2f417f27d702472c14782154e4d /apps/web | |
| parent | bf5c99cb10a0b35b0101bf8f9858c176889a0284 (diff) | |
| download | karakeep-45db6147032071d270fbf2b577a234393247d921.tar.zst | |
fix(web): don't bundle tiktoken in client bundles
Diffstat (limited to 'apps/web')
| -rw-r--r-- | apps/web/next.config.mjs | 7 | ||||
| -rw-r--r-- | apps/web/package.json | 1 |
2 files changed, 7 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); diff --git a/apps/web/package.json b/apps/web/package.json index 91c257e1..affbb48f 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -108,6 +108,7 @@ "@karakeep/prettier-config": "workspace:^0.1.0", "@karakeep/tailwind-config": "workspace:^0.1.0", "@karakeep/tsconfig": "workspace:^0.1.0", + "@next/bundle-analyzer": "15.3.8", "@types/csv-parse": "^1.2.5", "@types/emoji-mart": "^3.0.14", "@types/react": "^19.1.6", |
