37 lines
905 B
TypeScript
37 lines
905 B
TypeScript
|
|
import { defineConfig } from 'vite'
|
||
|
|
import vue from '@vitejs/plugin-vue'
|
||
|
|
import postCssPxToRem from 'postcss-pxtorem'
|
||
|
|
import vueSetupExtend from 'vite-plugin-vue-setup-extend'
|
||
|
|
import Components from 'unplugin-vue-components/vite'
|
||
|
|
import { VantResolver } from 'unplugin-vue-components/resolvers'
|
||
|
|
|
||
|
|
// https://vitejs.dev/config/
|
||
|
|
export default defineConfig({
|
||
|
|
base: './',
|
||
|
|
publicDir: 'assets',
|
||
|
|
plugins: [vue(), vueSetupExtend(), Components({
|
||
|
|
resolvers: [VantResolver()],
|
||
|
|
})],
|
||
|
|
css: {
|
||
|
|
postcss: {
|
||
|
|
plugins: [
|
||
|
|
postCssPxToRem({
|
||
|
|
rootValue: 40,
|
||
|
|
propList: ['*']
|
||
|
|
})
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
server: {
|
||
|
|
host: '0.0.0.0',
|
||
|
|
port: 1234,
|
||
|
|
open: true,
|
||
|
|
proxy: {
|
||
|
|
'/AppPeaManager': {
|
||
|
|
target: 'http://192.168.0.14:18087',
|
||
|
|
changeOrigin: true,
|
||
|
|
rewrite: (path) => path.replace(/^\/AppPeaManager/, '/AppPeaManager')
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
})
|