This commit is contained in:
那些花儿
2025-04-25 18:15:00 +08:00
parent ae90c7c33d
commit cb3bcb57bc
14 changed files with 624 additions and 561 deletions
+7 -2
View File
@@ -3,8 +3,9 @@ import uni from '@dcloudio/vite-plugin-uni'
import AutoImport from 'unplugin-auto-import/vite';
import Components from 'unplugin-vue-components/vite';
import { TDesignResolver } from 'unplugin-vue-components/resolvers';
import path from 'path';
const path = require('path');
const fs = require('fs');
// https://vitejs.dev/config/
export default defineConfig({
@@ -27,9 +28,13 @@ export default defineConfig({
}
},
server: {
https: {
cert: fs.readFileSync(path.join(__dirname, 'src/ssl/localhost+2.pem')),
key: fs.readFileSync(path.join(__dirname, 'src/ssl/localhost+2-key.pem'))
},
proxy: {
'/api': {
target: 'http://192.168.0.107:9090',
target: 'http://192.168.41.118:9090',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}