加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vite.config.ts.timestamp-1703576351400.js 6.05 KB
一键复制 编辑 原始数据 按行查看 历史
lifuyun 提交于 2024-08-22 15:45 . 初始化前端环境
// vite.config.ts
import path from "path";
import { loadEnv } from "vite";
import { viteMockServe } from "vite-plugin-mock";
import createVuePlugin from "@vitejs/plugin-vue";
import vueJsx from "@vitejs/plugin-vue-jsx";
import svgLoader from "vite-svg-loader";
var CWD = process.cwd();
var vite_config_default = ({ mode }) => {
const { VITE_BASE_URL } = loadEnv(mode, CWD);
return {
base: VITE_BASE_URL,
define: {},
resolve: {
alias: {
"@": path.resolve("D:\\project\\2023\\project-zzyl-v2.1\\project-zzyl-admin-vue3-java", "./src")
}
},
css: {
preprocessorOptions: {
less: {
modifyVars: {
hack: `true; @import (reference) "${path.resolve(
"src/style/variables.less"
)}";`
},
math: "strict",
javascriptEnabled: true
}
}
},
plugins: [
createVuePlugin(),
vueJsx(),
viteMockServe({
mockPath: "mock",
localEnabled: false,
prodEnabled: true,
supportTs: true,
logger: true,
injectCode: `
import { setupProdMockServer } from '../mockProdServer';
setupProdMockServer();
`
}),
svgLoader()
],
server: {
port: 3002,
host: "0.0.0.0",
hmr: true,
proxy: {
"/api": {
target: "http://172.16.43.24:9995",
changeOrigin: true,
rewrite: (path2) => path2.replace(/^\/api/, "")
}
}
}
};
};
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImltcG9ydCBwYXRoIGZyb20gJ3BhdGgnXHJcbmltcG9ydCB7IENvbmZpZ0VudiwgVXNlckNvbmZpZywgbG9hZEVudiB9IGZyb20gJ3ZpdGUnXHJcbmltcG9ydCB7IHZpdGVNb2Nr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