fix: trace mssql in standalone build

This commit is contained in:
chenpei 2026-07-03 15:36:32 +08:00
parent 739db0bb71
commit e0d3b3d475

View File

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