You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
402 B

4 months ago
4 months ago
4 months ago
  1. import { defineConfig } from 'vite'
  2. import uni from '@dcloudio/vite-plugin-uni' //官方内置的,不用下载,下面代码粘贴直接用即可
  3. export default defineConfig({
  4. plugins: [
  5. uni()
  6. ],
  7. server: {
  8. port: 1314,
  9. proxy: {
  10. '/api': {
  11. target: 'http://192.168.1.106:8518/', // 目标服务
  12. changeOrigin: true,
  13. rewrite: path => path.replace(/^\/api/, ''),
  14. },
  15. }
  16. }
  17. })