feat: add listen code change

This commit is contained in:
2024-09-23 20:51:59 +08:00
parent 4d308921a3
commit 27f487c48f
13 changed files with 419 additions and 97 deletions

View File

@@ -7,9 +7,7 @@ import nesting from 'tailwindcss/nesting';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
],
plugins: [react()],
css: {
postcss: {
@@ -32,6 +30,13 @@ export default defineConfig({
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '/api'),
},
'/api/router': {
target: 'ws://localhost:4000',
changeOrigin: true,
ws: true,
rewriteWsOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '/api'),
},
},
},
});