bht-app/vite.config.js

47 lines
1.0 KiB
JavaScript
Raw Normal View History

2025-05-19 11:59:51 +08:00
/*
* @Author: xhc 15171145581@163.com
* @Date: 2025-05-19 10:21:48
2025-05-30 17:02:59 +08:00
* @LastEditors: XHC
* @LastEditTime: 2025-05-29 12:31:36
2025-05-19 11:59:51 +08:00
* @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({
2025-05-30 17:02:59 +08:00
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/, '')
}
}
}
2025-05-19 11:59:51 +08:00
})