提交 01d18cf6 作者: 翁进城

系统配置更改

上级 1167d4d9
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
/out/ /out/
# production # production
/build /.dist/
# misc # misc
.DS_Store .DS_Store
......
const dev = { const dev = {
baseUrl: '' baseUrl: 'local/'
} }
const prod = { const prod = {
......
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
let distDir = ".next"; //默认输出目录
if (process.env.NODE_ENV === "production") {
//生产环境用另一个目录构建,防止与dev冲突
distDir = ".dist";
}
const nextConfig = { const nextConfig = {
distDir,
reactStrictMode: true, reactStrictMode: true,
transpilePackages: ["antd"], transpilePackages: ["antd"],
redirects() { redirects() {
...@@ -14,8 +22,8 @@ const nextConfig = { ...@@ -14,8 +22,8 @@ const nextConfig = {
async rewrites() { async rewrites() {
return [ return [
{ {
source: "/pms/:path*", source: "/local/:path*",
destination: "http://120.77.247.178/pms/:path*", destination: "http://120.77.247.178/:path*",
}, },
]; ];
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论