..
This commit is contained in:
@@ -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/, '')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user