You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
640 B

1 month ago
import { defineConfig, loadEnv } from 'vite'
1 month ago
import uni from '@dcloudio/vite-plugin-uni'
1 month ago
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')
const proxyTarget = env.VITE_API_PROXY_TARGET || 'http://127.0.0.1:8000'
return {
plugins: [uni()],
css: {
preprocessorOptions: {
scss: {
additionalData: '@import "@/uni.scss"; @import "uview-plus/theme.scss";',
},
1 month ago
},
},
1 month ago
server: {
host: '0.0.0.0',
port: 5174,
proxy: {
'/api': {
target: proxyTarget,
changeOrigin: true,
},
1 month ago
},
},
1 month ago
}
1 month ago
})