Add settings to use npm run dev server with cista -l :8000 backend
This commit is contained in:
parent
07fe7448cc
commit
a8ea43194d
|
@ -9,6 +9,15 @@ import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import pluginRewriteAll from 'vite-plugin-rewrite-all';
|
import pluginRewriteAll from 'vite-plugin-rewrite-all';
|
||||||
|
|
||||||
|
// Development mode:
|
||||||
|
// npm run dev # Run frontend that proxies to dev_backend
|
||||||
|
// cista -l :8000 --dev # Run backend
|
||||||
|
const dev_backend = {
|
||||||
|
target: "http://localhost:8000",
|
||||||
|
changeOrigin: false, // Use frontend "host" to match "origin" from browser
|
||||||
|
ws: true,
|
||||||
|
}
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
|
@ -34,6 +43,14 @@ export default defineConfig({
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
server: {
|
||||||
|
proxy: {
|
||||||
|
"/api": dev_backend,
|
||||||
|
"/files": dev_backend,
|
||||||
|
"/login": dev_backend,
|
||||||
|
"/logout": dev_backend,
|
||||||
|
}
|
||||||
|
},
|
||||||
build: {
|
build: {
|
||||||
outDir: "../cista/wwwroot",
|
outDir: "../cista/wwwroot",
|
||||||
emptyOutDir: true,
|
emptyOutDir: true,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user