1 Star 0 Fork 7

橘年/ladies-health

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vite.config.ts 1.92 KB
一键复制 编辑 原始数据 按行查看 历史
橘年 提交于 2023-04-24 20:08 . chore : 配置调整
import {defineConfig, splitVendorChunkPlugin} from "vite";
import react from "@vitejs/plugin-react";
import jotaiDebugLabel from "jotai/babel/plugin-debug-label";
import jotaiReactRefresh from "jotai/babel/plugin-react-refresh";
import tsConfigPath from "vite-tsconfig-paths";
import {VitePWA} from "vite-plugin-pwa";
import UnoCSS from 'unocss/vite'
import {presetWind} from "unocss";
// https://vitejs.dev/config/
export default defineConfig((env) => {
return {
plugins: [
env.mode === "development" && react({
babel: {plugins: [jotaiDebugLabel, jotaiReactRefresh]},
}),
tsConfigPath(),
UnoCSS({
presets: [presetWind()],
theme: {},
}),
splitVendorChunkPlugin(),
VitePWA({
registerType: "autoUpdate", // 自动更新
injectRegister: "inline", // 注入到html中
manifest: {
icons: [{
src:
"//cdn.jsdelivr.net/gh/gtoxlili/give-advice/frontend/src/assets/logo.png",
sizes: "128x128",
type: "image/png",
}],
start_url: "/",
short_name: "WoMen",
name: "WoMen",
theme_color: "#ffffff",
},
}),
],
server: env.mode === "development"
? {
host: "0.0.0.0",
port: 3000,
proxy: {
"/api": {
target: "http://localhost:16807",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""),
},
},
}
: {},
base: "./",
build: {
reportCompressedSize: false,
},
};
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/gtio/ladies-health.git
git@gitee.com:gtio/ladies-health.git
gtio
ladies-health
ladies-health
master

搜索帮助