# 默认配置 - 文档站点
[build]
  command = "bun install && bun run docs:build"
  publish = "docs/.vitepress/dist"

[build.environment]
  NODE_VERSION = "20"

# Admin 后台应用
[context.admin]
  command = "bun install && bun run build --filter=ppanel-admin-web"
  publish = "apps/admin/dist"

[context.admin.environment]
  NODE_VERSION = "20"

# User 用户前台应用
[context.user]
  command = "bun install && bun run build --filter=ppanel-user-web"
  publish = "apps/user/dist"

[context.user.environment]
  NODE_VERSION = "20"

# 重定向规则
[[redirects]]
  from = "/api/*"
  to = "https://api.ppanel.dev/:splat"
  status = 200
  force = false

# SPA 路由支持
[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200
