initial commit
This commit is contained in:
28
web/vue-app/vite.config.ts
Normal file
28
web/vue-app/vite.config.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { fileURLToPath, URL } from 'node:url'
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
//import vueDevTools from 'vite-plugin-vue-devtools'
|
||||
import fs from 'fs'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue() /*vueDevTools()*/],
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
https: {
|
||||
key: fs.readFileSync('./192.168.1.102+1-key.pem'),
|
||||
cert: fs.readFileSync('./192.168.1.102+1.pem'),
|
||||
},
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://192.168.1.102:5000',
|
||||
changeOrigin: true,
|
||||
rewrite: (p) => p.replace(/^\/api/, ''),
|
||||
},
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user