Files
awoooi/apps/web/next.config.js
OG T 9188e499cc
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
feat(web): Sprint 5 Phase 3+4 — 整合頁面完成 + 舊路由保留並存
Phase 3: 5 個整合頁面 (lazy import 現有內容)
Phase 4: 舊路由暫保留獨立可用,新舊並存
  - /monitoring 仍可訪問 (原始頁面)
  - /observability?tab=monitoring (整合入口)
  - 避免 redirect 循環問題

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 22:10:46 +08:00

42 lines
1.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const { withSentryConfig } = require('@sentry/nextjs')
const createNextIntlPlugin = require('next-intl/plugin')
const withNextIntl = createNextIntlPlugin('./src/i18n/request.ts')
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
transpilePackages: ['@awoooi/lewooogo-core'],
output: 'standalone',
experimental: {
typedRoutes: true,
},
// CI/CD: ESLint 在獨立 lint job 執行build 時跳過
eslint: {
ignoreDuringBuilds: true,
},
// CI/CD: TypeScript 錯誤在獨立 type-check job 處理
typescript: {
ignoreBuildErrors: true,
},
// Sprint 5: 舊路由暫不 redirect
// 原因: 整合頁面用 lazy import 載入原始頁面redirect 會造成循環
// 策略: 舊路由保持獨立可用,新路由是整合入口
// 未來: 統帥確認無問題後,可逐步加入 redirect
}
// Sentry 配置 (Self-Hosted @ 192.168.0.110)
const sentryWebpackPluginOptions = {
// 只在有 AUTH_TOKEN 時上傳 source maps
silent: true,
// 組織與專案 (Self-Hosted 設定)
org: process.env.SENTRY_ORG || 'awoooi',
project: process.env.SENTRY_PROJECT || 'awoooi-web',
// 禁用自動 source map 上傳 (Self-Hosted 需手動配置)
disableServerWebpackPlugin: !process.env.SENTRY_AUTH_TOKEN,
disableClientWebpackPlugin: !process.env.SENTRY_AUTH_TOKEN,
}
// 組合: next-intl → sentry
module.exports = withSentryConfig(withNextIntl(nextConfig), sentryWebpackPluginOptions)