- Added Vue.js and various VitePress plugins to package.json for enhanced documentation capabilities. - Created vue.js and vue.js.map files in the VitePress cache for Vue component support. - Configured netlify.toml for build commands and redirects to support SPA routing and API proxying.
37 lines
746 B
TOML
37 lines
746 B
TOML
# 默认配置 - 文档站点
|
|
[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
|