-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
33 lines (32 loc) · 872 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
31
32
33
import path from 'path'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import yaml from '@rollup/plugin-yaml'
import ViteRequireContext from '@originjs/vite-plugin-require-context'
import eslintPlugin from 'vite-plugin-eslint'
export default defineConfig({
assetsInclude: /\.(pdf|jpg|png|svg)$/,
resolve: {
alias: {
'@/': `${path.resolve(__dirname, './src')}/`,
'@assets/': `${path.resolve(__dirname, './src/assets')}/`,
'@public/': `${path.resolve(__dirname, './public')}/`,
'@sb/': `${path.resolve(__dirname, './stories')}/`,
},
},
server: {
port: 3000,
},
publicDir: path.resolve(__dirname, './public'),
base: './',
plugins: [
eslintPlugin(),
vue(),
ViteRequireContext(),
yaml({
transform(data) {
return data === null ? {} : undefined
},
}),
],
})