добился какой то работы с API

This commit is contained in:
2025-07-20 15:25:51 +03:00
parent 0d00245bf2
commit 71b5ea4e7b
21 changed files with 1910 additions and 1037 deletions

View File

@@ -1,16 +1,25 @@
import react from "@vitejs/plugin-react-swc";
import path from "path";
import { defineConfig } from "vite";
import react from '@vitejs/plugin-react-swc'
import path from 'path'
import { defineConfig } from 'vite'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
"@": path.resolve("src"),
"@widgets": path.resolve("src/widgets"),
"@features": path.resolve("src/features"),
"@entities": path.resolve("src/entities"),
'@': path.resolve('src'),
'@widgets': path.resolve('src/widgets'),
'@features': path.resolve('src/features'),
'@entities': path.resolve('src/entities'),
},
},
});
server: {
proxy: {
'/api': {
target: 'http://localhost:8000',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''),
},
},
},
})