-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
40 lines (38 loc) · 1003 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
34
35
36
37
38
39
40
/// <reference types="vitest" />
import { defineConfig } from 'vite'
import { resolve } from 'path'
import dts from 'vite-plugin-dts'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [dts(), vue()],
resolve: {
alias: {
'~': new URL('./src/components', import.meta.url).pathname,
'@': new URL('./src/', import.meta.url).pathname,
'@layouts': new URL('./src/layouts', import.meta.url).pathname,
'@pages': new URL('./src/pages', import.meta.url).pathname,
'@router': new URL('./src/router', import.meta.url).pathname,
}
},
build: {
lib: {
entry: resolve('./src', 'mazejs.ts'),
name: 'Mazejs',
fileName: 'mazejs',
},
rollupOptions: {
external: ['vue'],
output: {
globals: {
vue: 'Vue',
},
},
},
},
test: {
globals: true,
environment: 'jsdom',
includeSource: ['src/**/*.{src/**/*.{js, ts, tsx, vue}']
},
})