From e7925a1ce1356d7be71bca7f8e5123b52d70d095 Mon Sep 17 00:00:00 2001 From: sijinhui Date: Sat, 31 Aug 2024 12:35:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=84=E5=BB=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- next.config.mjs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 187226af7..4a8db0f10 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,7 +38,7 @@ COPY --from=builder /app/.next/standalone ./ COPY --from=builder /app/.next/static ./.next/static COPY --from=builder /app/.next/server ./.next/server -COPY --from=builder /app/node_modules/tiktoken ./node_modules/tiktoken +# COPY --from=builder /app/node_modules/tiktoken ./node_modules/tiktoken # COPY --from=builder /app/node_modules/sharp ./node_modules/sharp RUN rm -f .env diff --git a/next.config.mjs b/next.config.mjs index a7b7cd5f3..6bb9f409a 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -86,6 +86,7 @@ const nextConfig = { }, experimental: { forceSwcTransforms: true, + serverComponentsExternalPackages: ["tiktoken"] }, // externals: { // 'sharp': 'commonjs sharp'