You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
698 B
32 lines
698 B
import { defineConfig, loadEnv } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import svgr from "vite-plugin-svgr";
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
// @ts-ignore
|
|
const env = loadEnv(mode, process.cwd());
|
|
|
|
return {
|
|
base: "/",
|
|
plugins: [svgr(), react()],
|
|
server: {
|
|
proxy: {
|
|
"/api": env.VITE_API_URL,
|
|
"/django_media": env.VITE_API_URL,
|
|
"/default_data": env.VITE_API_URL,
|
|
}
|
|
},
|
|
css: {
|
|
preprocessorOptions: {
|
|
less: {
|
|
modifyVars: {
|
|
"primary-color": "#0052FF",
|
|
"border-radius-base": "5px",
|
|
},
|
|
javascriptEnabled: true,
|
|
},
|
|
},
|
|
},
|
|
};
|
|
});
|