v0.9 工单修复部署
This commit is contained in:
Executable
+26
@@ -0,0 +1,26 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
// 静态导出开关:BUILD_EXPORT=true 时启用 output:export + basePath
|
||||
// 这样 dev 服务器不受影响,仅构建静态资源时切换配置
|
||||
const isExport = process.env.BUILD_EXPORT === "true";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
output: isExport ? "export" : "standalone",
|
||||
// 部署到 https://gitea-pages.atdunbg.xyz/Super_Z/echo-nexus 时需要 basePath
|
||||
...(isExport
|
||||
? {
|
||||
basePath: "/Super_Z/echo-nexus",
|
||||
trailingSlash: true,
|
||||
}
|
||||
: {}),
|
||||
images: {
|
||||
unoptimized: true,
|
||||
},
|
||||
/* config options here */
|
||||
typescript: {
|
||||
ignoreBuildErrors: true,
|
||||
},
|
||||
reactStrictMode: false,
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
Reference in New Issue
Block a user