You cannot 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
599 B
TypeScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import postCssPxToRem from "postcss-pxtorem"
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue({reactivityTransform: true,}),],
server: {
//使用IP能访问
host: '0.0.0.0'
},
base: process.env.NODE_ENV === 'production' ? './' : '/',
css: {
postcss: {
plugins: [
postCssPxToRem({
rootValue: 180, // 1rem的大小
propList: ['*', '!border'], // 需要转换的属性,这里选择全部都进行转换
})
]
}
},
})