new major change

This commit is contained in:
2026-03-13 10:13:31 +07:00
parent ce23aedcff
commit b36308b05c
519 changed files with 5951 additions and 89646 deletions
+11 -9
View File
@@ -3,7 +3,6 @@ import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
import { fileURLToPath } from 'url';
import path from 'path';
import { mockApi } from './src/_mock/api';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
@@ -20,15 +19,15 @@ export default defineConfig({
hmrNotifier: true,
navigationNotifier: true,
visualEditAgent: true,
// localBackend: true,
localBackend: true,
}),
react(),
{
name: 'local-mock-api',
configureServer(server) {
mockApi(server);
}
}
// {
// name: 'local-mock-api',
// configureServer(server) {
// mockApi(server);
// }
// }
],
resolve: {
alias: {
@@ -41,8 +40,11 @@ export default defineConfig({
open: true,
proxy: {
'/api': {
target: 'http://localhost:5173',
// target: 'http://localhost:5173',
target: 'https://agro.pkc-dev.org',
changeOrigin: true,
secure: false,
rewrite: (path) => path.replace(/^\/api/, '/api')
},
},
},