🎈 perf: 暂存
This commit is contained in:
parent
dc5cb5f242
commit
f74d3d68a4
52
vite.config.ts
Normal file
52
vite.config.ts
Normal file
@ -0,0 +1,52 @@
|
||||
import legacy from '@vitejs/plugin-legacy';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import { resolve } from 'node:path';
|
||||
import UnoCSS from 'unocss/vite';
|
||||
import { FileSystemIconLoader } from 'unplugin-icons/loaders';
|
||||
import IconsResolver from 'unplugin-icons/resolver';
|
||||
import Icons from 'unplugin-icons/vite';
|
||||
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
|
||||
import Components from 'unplugin-vue-components/vite';
|
||||
import { defineConfig } from 'vite';
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
legacy({
|
||||
targets: ['defaults', 'Chrome >= 100', 'Edge >= 100', 'FireFox >= 110'],
|
||||
modernPolyfills: true,
|
||||
}),
|
||||
vue(),
|
||||
Components({
|
||||
resolvers: [
|
||||
ElementPlusResolver(),
|
||||
IconsResolver({
|
||||
prefix: 'icon',
|
||||
enabledCollections: ['ep'],
|
||||
customCollections: ['cs'],
|
||||
}),
|
||||
],
|
||||
globs: [
|
||||
'!./src/components/*.vue',
|
||||
'!./src/components/**/*.vue',
|
||||
'!./src/views/*.vue',
|
||||
'!./src/views/**/*.vue',
|
||||
],
|
||||
}),
|
||||
Icons({
|
||||
autoInstall: true,
|
||||
customCollections: {
|
||||
cs: FileSystemIconLoader('./src/assets/icons'),
|
||||
},
|
||||
}),
|
||||
UnoCSS(),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve('./src'),
|
||||
},
|
||||
},
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
port: 18081,
|
||||
},
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user