| 12345678910111213141516171819202122232425 |
- import { defineConfig } from "vite"
- import uni from "@dcloudio/vite-plugin-uni";
- const path = require('path')
- const fs = require('fs')
- export default defineConfig({
- plugins: [
- uni()
- ],
- server: {
- proxy: {
- '/api': {
- rewrite: path => path.replace(/^\/api/, ''),
- logLevel: 'debug',
- target: 'http://127.0.0.1:8888',
- changeOrigin: true
- },
-
- },
- // 音视频功能需要ssl证书,如需调试请打开注释
- // https: {
- // cert: fs.readFileSync(path.join(__dirname, 'ssl/cert.crt')),
- // key: fs.readFileSync(path.join(__dirname, 'ssl/cert.key'))
- // }
- }
- })
|