1234567891011121314151617181920212223242526272829303132333435363738394041 |
- import { defineConfig } from "vite";
- import path from "path";
- import react from "@vitejs/plugin-react";
- import vitePluginImp from "vite-plugin-imp";
-
- // https://vitejs.dev/config/
- export default defineConfig({
- base: '',
- server: {
- port: 3000,
- host: "0.0.0.0",
- proxy: {
- "/api": {
- target: "http://192.168.89.13:8080",
- changeOrigin: true,
- },
- },
- },
- plugins: [
- react(),
- vitePluginImp({
- libList: [
- {
- libName: "antd",
- style: (name) => `antd/es/${name}/style`,
- },
- ],
- })
- ],
- resolve: {
- alias: [{ find: "@", replacement: path.resolve(__dirname, "src") }],
- },
- css: {
- preprocessorOptions: {
- less: {
- // modifyVars: { 'primary-color': '#13c2c2' },
- javascriptEnabled: true,
- },
- },
- },
- });
|