Get api url from env See merge request spatial/postamates_frontend!4dev
commit
78914f40ba
@ -0,0 +1 @@
|
||||
VITE_API_URL=https://postnet.dev.selftech.ru
|
||||
@ -1,28 +1,30 @@
|
||||
import { defineConfig } from "vite";
|
||||
import { defineConfig, loadEnv } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import svgr from "vite-plugin-svgr";
|
||||
|
||||
const BASE_URL = "https://postnet-dev.selftech.ru/";
|
||||
export default defineConfig(({ mode }) => {
|
||||
// @ts-ignore
|
||||
const env = loadEnv(mode, process.cwd());
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
base: "/",
|
||||
plugins: [svgr(), react()],
|
||||
server: {
|
||||
proxy: {
|
||||
"/account": BASE_URL,
|
||||
"/api": BASE_URL,
|
||||
return {
|
||||
base: "/",
|
||||
plugins: [svgr(), react()],
|
||||
server: {
|
||||
proxy: {
|
||||
"/account": env.VITE_API_URL,
|
||||
"/api": env.VITE_API_URL,
|
||||
},
|
||||
},
|
||||
},
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
less: {
|
||||
modifyVars: {
|
||||
"primary-color": "#CC2222FF",
|
||||
"border-radius-base": "5px",
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
less: {
|
||||
modifyVars: {
|
||||
"primary-color": "#CC2222FF",
|
||||
"border-radius-base": "5px",
|
||||
},
|
||||
javascriptEnabled: true,
|
||||
},
|
||||
javascriptEnabled: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
Loading…
Reference in new issue