diff --git a/next.config.js b/next.config.js index aaa733d..3bd46d2 100644 --- a/next.config.js +++ b/next.config.js @@ -1,8 +1,38 @@ /** @type {import('next').NextConfig} */ const nextConfig = { output: 'standalone', - // 优化 standalone 输出,排除不必要的文件 + images: { + remotePatterns: [ + { + protocol: 'https', + hostname: 's3.1080p.hk', + }, + { + protocol: 'http', + hostname: 's3.1080p.hk', + }, + { + protocol: 'https', + hostname: 's3.yydd.ai', + }, + { + protocol: 'http', + hostname: 's3.yydd.ai', + }, + { + protocol: 'https', + hostname: 's3.jiansun.vip', + }, + { + protocol: 'http', + hostname: 's3.jiansun.vip', + }, + ], + }, experimental: { + // SQL Server 报表库同步需要在 standalone 镜像中保留 mssql 运行依赖。 + serverComponentsExternalPackages: ['mssql'], + // 优化 standalone 输出,排除不必要的文件 outputFileTracingExcludes: { '*': [ // 排除本地上传文件 @@ -35,36 +65,6 @@ const nextConfig = { 'Dockerfile*', ], }, - }, - images: { - remotePatterns: [ - { - protocol: 'https', - hostname: 's3.1080p.hk', - }, - { - protocol: 'http', - hostname: 's3.1080p.hk', - }, - { - protocol: 'https', - hostname: 's3.yydd.ai', - }, - { - protocol: 'http', - hostname: 's3.yydd.ai', - }, - { - protocol: 'https', - hostname: 's3.jiansun.vip', - }, - { - protocol: 'http', - hostname: 's3.jiansun.vip', - }, - ], - }, - experimental: { // 启用 instrumentation hook(应用启动时执行) instrumentationHook: true, serverActions: {