Kopie van https://gitlab.com/studieverenigingvia/ict/centurion met een paar aanpassingen
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.
 
 
 
 
centurion/frontend/vite.config.ts

46 lines
941 B

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import svgr from "vite-plugin-svgr";
import vitePluginImp from "vite-plugin-imp";
// https://vitejs.dev/config/
export default defineConfig({
// This changes the out put dir from dist to build
// comment this out if that isn't relevant for your project
build: {
outDir: "build",
},
plugins: [
react(),
svgr(),
vitePluginImp({
libList: [
{
libName: "antd",
style: (name) => `antd/es/${name}/style`,
},
],
}),
],
server: {
proxy: {
"/socket.io": {
target: "http://localhost:3001",
ws: true,
},
},
},
resolve: {
alias: [{ find: /^~/, replacement: "" }],
},
css: {
preprocessorOptions: {
less: {
modifyVars: {
"primary-color": "#304ba3",
},
javascriptEnabled: true,
},
},
},
});