30 lines
691 B
JavaScript
30 lines
691 B
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
typescript: {
|
|
ignoreBuildErrors: true,
|
|
},
|
|
images: {
|
|
unoptimized: true,
|
|
},
|
|
output: 'standalone',
|
|
// 抑制开发环境下的错误遮罩
|
|
devIndicators: {
|
|
buildActivity: false,
|
|
appIsrStatus: false,
|
|
},
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: '/api/:path*',
|
|
headers: [
|
|
{ key: 'Access-Control-Allow-Methods', value: 'GET,POST,PUT,DELETE,OPTIONS' },
|
|
{ key: 'Access-Control-Allow-Headers', value: 'Content-Type,Authorization' },
|
|
{ key: 'Access-Control-Allow-Credentials', value: 'true' },
|
|
],
|
|
},
|
|
]
|
|
},
|
|
}
|
|
|
|
export default nextConfig
|