Created
February 20, 2024 14:45
-
-
Save brightsheden/1ea5ec310b54e7814cc7dd9c27431ac8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { defineConfig } from 'vite' | |
import react from '@vitejs/plugin-react' | |
// https://vitejs.dev/config/ | |
export default defineConfig({ | |
//base: "/static/", | |
build: { | |
manifest: true, | |
outDir: 'dist', | |
assetsDir: 'static', | |
}, | |
plugins: [react(), | |
], | |
server:{ | |
proxy: { | |
'/api': { | |
target: 'http://127.0.0.1:8000', | |
changeOrigin: true, | |
secure: false, | |
ws: true, | |
//rewrite: (path) => path.replace(/^\/api/, ''), | |
// agent:new http.Agent() | |
}, | |
'/images':{ | |
target: 'http://127.0.0.1:8000', | |
changeOrigin: true, | |
} | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment