create-chuntianxiaozhu
Version:
春天小猪模板工具
32 lines (30 loc) • 885 B
text/typescript
import { defineConfig } from "@ice/app";
import request from "@ice/plugin-request";
import store from "@ice/plugin-store";
import auth from "@ice/plugin-auth";
import loginState from "./plugins/plugin-login-state/index";
// The project config, see https://v3.ice.work/docs/guide/basic/config
const isDevelop = process.env.NODE_ENV !== "production";
export default defineConfig(() => ({
ssg: false,
minify: isDevelop ? false : "swc",
plugins: [request(), store(), auth(), loginState()],
compileDependencies: false,
routes: {
ignoreFiles: ["**/components/**"],
defineRoutes: (route) => {
// 定制路由路径
route("/design", "index.tsx");
},
},
publicPath: "./",
devPublicPath: "/",
externals: {},
proxy: {
"/api": {
target: "http://localhost:3000/",
changeOrigin: true,
pathRewrite: { "^/api": "" },
},
},
}));