initial site
This commit is contained in:
commit
da5b259d06
167 files changed
+34157
No files matched your search
@@ -0,0 +1,33 @@
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { defineConfig } from "vite";
|
||||
import { viteSingleFile } from "vite-plugin-singlefile";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react(), tailwindcss(), viteSingleFile()],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "src"),
|
||||
},
|
||||
},
|
||||
// dev-режим: /api уходит в локально запущенную CRM (python crm/server.py),
|
||||
// /media — загруженные владельцем фото позиций
|
||||
server: {
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: process.env.CRM_API_URL || "http://127.0.0.1:47613",
|
||||
changeOrigin: true,
|
||||
},
|
||||
"/media": {
|
||||
target: process.env.CRM_API_URL || "http://127.0.0.1:47613",
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user