bonus-material-app/vite.config.js

36 lines
1.0 KiB
JavaScript
Raw Normal View History

2024-11-18 09:05:38 +08:00
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'
},
},
},
2024-11-19 11:20:59 +08:00
server: {
proxy: {
// 在此处编写代理规则
'/api': {
2025-07-25 16:49:58 +08:00
target: 'http://sgwpdm.ah.sgcc.com.cn/iws/jiju-api',
// target: 'http://192.168.0.96:18080',
2025-06-25 15:40:37 +08:00
// target: 'http://36.33.26.201:19988/prod-api/',
// target: 'http://192.168.0.234:18080',
2024-11-28 15:31:05 +08:00
// target: 'http://localhost:18080',
2024-11-19 11:20:59 +08:00
changeOrigin: true,
rewrite: (path) => {
return path.replace(/\/api/, '')
},
},
},
},
2024-11-18 09:05:38 +08:00
})