WXL
14 小时以前 888f941ae16c850c0f1a844ec9436058840920bd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
 
export default defineConfig({
  define: {
    __VUE_I18N_FULL_INSTALL__: true,
    __VUE_I18N_LEGACY_API__: true,
    __INTLIFY_PROD_DEVTOOLS__: false,
  },
  plugins: [uni()],
  css: {
    preprocessorOptions: {
      scss: {
        additionalData: `@import "@/static/style/global.scss";`,
     silenceDeprecations: ['legacy-js-api', 'color-functions', 'import'],  
      }
    }
  },
  server: {
      proxy: {
        '/api': {
          target: process.env.VITE_APP_BASE_API,
          changeOrigin: true,
          rewrite: path => path.replace(/^\/api/, ''),
        },
      }
    }
})