You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.2 KiB
50 lines
1.2 KiB
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { resolve } from 'path'
|
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
import Components from 'unplugin-vue-components/vite'
|
|
import { ArcoResolver } from 'unplugin-vue-components/resolvers'
|
|
import { vitePluginForArco } from '@arco-plugins/vite-vue'
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
// 添加基础路径配置
|
|
base: '/epmet-apartment-front/',
|
|
publicDir: 'epmet-apartment-front',
|
|
build: {
|
|
outDir: "epmet-apartment-front",
|
|
assetsDir: 'static',
|
|
target:['edge90','chrome90','firefox90','safari15']
|
|
},
|
|
plugins: [
|
|
vue(),
|
|
//自动加载组件样式
|
|
vitePluginForArco({
|
|
style: 'css',
|
|
}),
|
|
//自动导入组件
|
|
AutoImport({
|
|
resolvers: [ArcoResolver()],
|
|
}),
|
|
//按需加载组件
|
|
Components({
|
|
resolvers: [
|
|
ArcoResolver({
|
|
sideEffect: true,
|
|
}),
|
|
],
|
|
}),
|
|
],
|
|
resolve: {
|
|
//配置路径别名
|
|
alias: [
|
|
{
|
|
find: '@',
|
|
replacement: resolve(__dirname, './src'),
|
|
},
|
|
{
|
|
find: 'components',
|
|
replacement: resolve(__dirname, 'src/components'),
|
|
},
|
|
],
|
|
},
|
|
})
|
|
|