36 lines
1.0 KiB
JavaScript
36 lines
1.0 KiB
JavaScript
import { defineConfig } from 'vite'
|
|
import uni from '@dcloudio/vite-plugin-uni'
|
|
// import eslintPlugin from 'vite-plugin-eslint'
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
uni(),
|
|
// eslintPlugin({
|
|
// include: ['src/**/*.js', 'src/**/*.vue', 'src/*.js', 'src/*.vue']
|
|
// })
|
|
],
|
|
css: {
|
|
preprocessorOptions: {
|
|
scss: {
|
|
api: 'modern-compiler', // or 'modern'
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
proxy: {
|
|
// 在此处编写代理规则
|
|
'/api': {
|
|
// target: 'http://192.168.2.76:18080',
|
|
// target: 'http://192.168.0.244:18580',
|
|
// target: 'http://36.33.26.201:19988/prod-api/',
|
|
target: 'http://sgwpdm.ah.sgcc.com.cn/iws/clz-api/',
|
|
// target: 'http://localhost:18080',
|
|
changeOrigin: true,
|
|
rewrite: (path) => {
|
|
return path.replace(/\/api/, '')
|
|
},
|
|
},
|
|
},
|
|
},
|
|
})
|