vite.config.ts 685 B

1234567891011121314151617181920212223242526272829303132
  1. import { defineConfig } from 'vite'
  2. import uni from '@dcloudio/vite-plugin-uni'
  3. import { resolve } from 'node:path'
  4. export default defineConfig({
  5. plugins: [uni()],
  6. transpileDependencies: ['uview-plus'],
  7. css: {
  8. preprocessorOptions: {
  9. scss: {
  10. silenceDeprecations: ['legacy-js-api', 'color-functions', 'import']
  11. }
  12. }
  13. },
  14. resolve: {
  15. dedupe: ['vue', 'pinia'],
  16. alias: {
  17. '@': resolve(__dirname, 'src')
  18. }
  19. },
  20. server: {
  21. port: 9011,
  22. host: '0.0.0.0',
  23. proxy: {
  24. '/mobile': {
  25. target: process.env.VITE_DEV_API_TARGET || 'http://127.0.0.1:8086',
  26. changeOrigin: true,
  27. secure: false
  28. }
  29. }
  30. }
  31. })