代码拉取完成,页面将自动刷新
import reactRefresh from "@vitejs/plugin-react-refresh";
import istanbul from "rollup-plugin-istanbul";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import vitePluginImp from "vite-plugin-imp";
import path from "path";
export default defineConfig(({ mode }) => ({
base: "rondo",
css: {
preprocessorOptions: {
less: {
javascriptEnabled: true,
modifyVars: {
// "@popover-background": "#2e3238"
"@btn-primary-color": "var(--font-normal)",
"@btn-primary-bg": "var(--bg-light)",
"@label-color": "var(--font-normal)",
"@input-bg": "var(--bg-main)",
"@input-color": "var(--font-normal)",
// "@select-item-selected-color": "var(--font-normal)",
// "@select-item-selected-bg": "var(--bg-light)",
"@select-background": "var(--bg-main)",
"@input-addon-bg": "var(--bg-light)",
"@modal-header-bg": "var(--bg)",
"@modal-content-bg": "var(--bg)",
"@modal-footer-bg": "var(--bg)",
"@modal-heading-color": "var(--font-normal)",
// "@select-selection-item-bg": "var(--bg-light)",
// "@select-selection-item-color": "var(--font-normal)",
},
},
},
},
plugins: [
tsconfigPaths(),
reactRefresh(),
vitePluginImp({
libList: [
{
libName: "antd",
style: (name) => `antd/lib/${name}/style/index.less`,
},
],
}),
mode === "test" &&
istanbul({
include: ["src/**/*.tsx"],
}),
],
build: {
outDir: "rondo",
},
resolve: {
alias: {
"~": path.resolve(__dirname, "./"),
"@": path.resolve(__dirname, "src"),
},
},
}));
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。