/*
 * @Author: xhc 15171145581@163.com
 * @Date: 2025-05-19 10:21:48
 * @LastEditors: XHC
 * @LastEditTime: 2025-05-29 12:31:36
 * @FilePath: \bht-app\vite.config.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import AutoImport from 'unplugin-auto-import/vite'
// https://vitejs.dev/config/
export default defineConfig({
	plugins: [
		uni(),
		AutoImport({
			imports: ["vue"]
		})
	],
	// resolve: {
	// 	alias: {
	// 	'@': resolve(__dirname, 'src'),
	// 	'/static': resolve(__dirname, 'static')
	// 	}
	// },
	css: {
		preprocessorOptions: {
			scss: {
				silenceDeprecations: ['legacy-js-api']
			},
		},
	},
	server: {
		// 端口
		host: '0.0.0.0',
		// 代理配置
		proxy: {
			'/bht': {
				target: 'http://192.168.2.67:9652',
				changeOrigin: true,
				rewrite: (p) => p.replace(/^\/bht/, '')
			}
		}
	}

})
