邃芒智像(Uniapp : WX、TT、H5)
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.
 
 
 
 

24 lines
552 B

  1. import { defineConfig } from 'vite'
  2. import uni from '@dcloudio/vite-plugin-uni'
  3. // https://vitejs.dev/config/
  4. export default defineConfig({
  5. transpileDependencies: ['uview-ui'],
  6. plugins: [
  7. uni(),
  8. ],
  9. server: {
  10. host: "0.0.0.0",
  11. port: '8591',
  12. open: true, // 运行是否自动打开浏览器
  13. proxy: {
  14. // 反向代理解决跨域
  15. "/api": {
  16. target: 'https://test.metavatar.cc/C', // 线上接口地址
  17. changeOrigin: true,
  18. rewrite: (path) => path.replace(/^\/api/, ""),
  19. },
  20. },
  21. },
  22. })