-
Notifications
You must be signed in to change notification settings - Fork 19
/
vite.config.ts
30 lines (29 loc) · 966 Bytes
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import path from 'node:path'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
import widget from '@widget-js/vite-plugin-widget'
import checker from 'vite-plugin-checker'
import UnoCSS from 'unocss/vite'
export default defineConfig({
base: './',
server: { port: 5174 },
build: {
rollupOptions: {
output: {
entryFileNames: 'assets/[name].js',
chunkFileNames: 'assets/[name].js',
assetFileNames: 'assets/[name].[ext]',
},
},
},
plugins: [vue(), UnoCSS(), widget(), checker({ typescript: true }), AutoImport({ resolvers: [ElementPlusResolver()] }), Components({ resolvers: [ElementPlusResolver()] })],
resolve: {
alias: [{
find: '@',
replacement: path.resolve(__dirname, 'src'),
}],
},
})