|
|
@ -3,6 +3,9 @@ import { resolve } from 'path' |
|
|
|
import vue from '@vitejs/plugin-vue' |
|
|
|
import autoprefixer from 'autoprefixer' |
|
|
|
import postcsspxtoviewport from 'postcss-px-to-viewport' |
|
|
|
import AutoImport from 'unplugin-auto-import/vite' |
|
|
|
import Components from 'unplugin-vue-components/vite' |
|
|
|
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers' |
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({ |
|
|
@ -17,7 +20,15 @@ export default defineConfig({ |
|
|
|
port: 5173, |
|
|
|
host: '0.0.0.0', |
|
|
|
}, |
|
|
|
plugins: [vue()], |
|
|
|
plugins: [ |
|
|
|
vue(), |
|
|
|
AutoImport({ |
|
|
|
resolvers: [ElementPlusResolver()], |
|
|
|
}), |
|
|
|
Components({ |
|
|
|
resolvers: [ElementPlusResolver()], |
|
|
|
}), |
|
|
|
], |
|
|
|
//配置sass
|
|
|
|
css: { |
|
|
|
preprocessorOptions: { |
|
|
|