构建优化

This commit is contained in:
sijinhui 2024-08-31 12:35:58 +08:00
parent e1306cd248
commit e7925a1ce1
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -86,6 +86,7 @@ const nextConfig = {
},
experimental: {
forceSwcTransforms: true,
serverComponentsExternalPackages: ["tiktoken"]
},
// externals: {
// 'sharp': 'commonjs sharp'