32 lines
921 B
TOML
32 lines
921 B
TOML
[build]
|
|
command = "pnpm run netlify-build"
|
|
publish = "dist"
|
|
|
|
[build.environment]
|
|
NODE_VERSION = "20"
|
|
|
|
[functions]
|
|
node_bundler = "esbuild"
|
|
# 增加内存限制和超时时间
|
|
[functions."server"]
|
|
included_files = ["app/drizzle/**/*"]
|
|
external_node_modules = []
|
|
node_bundler = "esbuild"
|
|
|
|
# Nuxt 会在 dist/_redirects 中自动生成重定向规则,将请求转发到 Netlify Functions
|
|
|
|
[[headers]]
|
|
for = "/_nuxt/*"
|
|
[headers.values]
|
|
Cache-Control = "public, max-age=31536000, immutable"
|
|
|
|
[[headers]]
|
|
for = "/assets/*"
|
|
[headers.values]
|
|
Cache-Control = "public, max-age=31536000, immutable"
|
|
|
|
[template.environment]
|
|
DATABASE_URL = "Neon数据库连接字符串,格式如:postgresql://username:password@host:port/database?sslmode=require"
|
|
JWT_SECRET = "JWT令牌签名密钥,建议使用强随机字符串"
|
|
REDIS_URL = "Redis缓存服务(可选,用于提升性能)"
|