1 Star 1 Fork 0

Wax/react-h5

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vite.config.js 1.28 KB
一键复制 编辑 原始数据 按行查看 历史
秦运红 提交于 2024-01-16 15:53 . 移除相关代码
/*
* @Author: hpu@foxmail.com
* @Date: 2023-12-26 15:54:50
* @LastEditors: hpu@foxmail.com
* @LastEditTime: 2024-01-10 10:57:55
* @FilePath: \react-h5\vite.config.js
* @Description:
*
* Copyright (c) 2023 by hpu@foxmail.com, All Rights Reserved.
*/
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react-swc";
import path from "path";
import svgr from "vite-plugin-svgr";
// https://vitejs.dev/config/
export default defineConfig(({ mode, command }) => {
const env = loadEnv(mode, process.cwd());
return {
plugins: [react({}), svgr()],
css: {
// 预处理器配置项
preprocessorOptions: {
less: {
math: "always"
}
}
},
resolve: {
alias: {
swiper: path.resolve(__dirname, "../../dist/"),
"@": path.resolve(__dirname, "src"),
"@assets": path.join(__dirname, "src/assets")
}
},
server: {
host: "0.0.0.0",
port: 7000,
// 是否开启 https
// http://localhost:5173/api/login -> http://localhost:3001/login
proxy: {
'/BOCGIFTPIC': {
target: 'https://mobile.jf365.boc.cn/BOCGIFTPIC',
changeOrigin: true,
rewrite: path => path.replace(RegExp(`^/BOCGIFTPIC`), '')
},
}
}
};
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/jifengf/react-h5.git
git@gitee.com:jifengf/react-h5.git
jifengf
react-h5
react-h5
dev

搜索帮助