1 Star 0 Fork 0

chonglin/clever-ui

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vite.config.ts 1.71 KB
一键复制 编辑 原始数据 按行查看 历史
lizw-2015 提交于 2021-07-05 23:01 . 52%
import { defineConfig } from "vite";
import legacy from "@vitejs/plugin-legacy";
import vitePluginImp from "vite-plugin-imp";
import reactRefresh from "@vitejs/plugin-react-refresh";
import { minifyHtml } from "vite-plugin-html";
const path = require("path");
// https://vitejs.dev/config/
export default defineConfig({
base: "/",
define: {
// isProdEnv: NODE_ENV === "production",
apiGlobalPrefix: JSON.stringify(""),
"process.env": "{}",
global: {},
},
plugins: [
legacy({
targets: ["defaults", "not IE 11"],
}),
vitePluginImp({
libList: [
// { libName: "antd", style: name => `antd/es/${name}/style/index.css` },
],
}),
reactRefresh(),
minifyHtml(),
],
publicDir: "public",
resolve: {
alias: {
"~": path.resolve(__dirname, "./"),
"@": path.resolve(__dirname, "./src"),
},
},
css: {
preprocessorOptions: {
less: {
javascriptEnabled: true,
modifyVars: {
// "white": "#3C3F41",
// "primary-color": "#3C3F41",
},
}
},
modules: {
localsConvention: "camelCaseOnly"
}
},
clearScreen: true,
server: {
host: "0.0.0.0",
port: 8000,
proxy: {
"/fast_api": {
target: "http://127.0.0.1:18081",
changeOrigin: true,
// rewrite: path => path,
},
"/api": {
target: "http://127.0.0.1:18081",
changeOrigin: true,
// rewrite: path => path,
},
},
force: true,
},
build: {
target: "modules",
polyfillDynamicImport: false,
outDir: "dist",
assetsDir: "assets",
assetsInlineLimit: 4096,
cssCodeSplit: true,
rollupOptions: {},
commonjsOptions: {}
},
});
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/godlinc/clever-ui.git
git@gitee.com:godlinc/clever-ui.git
godlinc
clever-ui
clever-ui
main

搜索帮助