From 8bfc90a5b0df21ec968b6f6a8cbe4fb346e0a9c0 Mon Sep 17 00:00:00 2001 From: Huang Xin Date: Sat, 24 Jan 2026 18:20:15 +0100 Subject: [PATCH] chore: fix nunjucks bundling (#3061) --- apps/readest-app/next.config.mjs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/readest-app/next.config.mjs b/apps/readest-app/next.config.mjs index e1085f2f..2e75e02d 100644 --- a/apps/readest-app/next.config.mjs +++ b/apps/readest-app/next.config.mjs @@ -27,10 +27,16 @@ const nextConfig = { assetPrefix: '', reactStrictMode: true, serverExternalPackages: ['isows'], + webpack: (config) => { + config.resolve.alias = { + ...config.resolve.alias, + nunjucks: 'nunjucks/browser/nunjucks.js', + }; + return config; + }, turbopack: { resolveAlias: { - // polyfill buffer for @supabase/storage-js which requires it in browser - buffer: 'buffer', + nunjucks: 'nunjucks/browser/nunjucks.js', }, }, transpilePackages: [