vite.config.ts 524 B

123456789101112131415161718192021222324
  1. import { defineConfig } from "vite";
  2. import uni from "@dcloudio/vite-plugin-uni";
  3. // https://vitejs.dev/config/
  4. export default defineConfig({
  5. plugins: [uni()],
  6. server: {
  7. proxy: {
  8. '/dev-api': {
  9. // target: 'http://192.168.11.48:8010',// 后端地址本地
  10. target: 'http://182.43.195.17:8010',// 后端地址测试
  11. changeOrigin: true,
  12. rewrite: path => path.replace(/^\/dev-api/, ''),
  13. }
  14. }
  15. },
  16. css: {
  17. preprocessorOptions: {
  18. scss: {
  19. silenceDeprecations: ['legacy-js-api'],
  20. },
  21. },
  22. },
  23. });