-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.ts
45 lines (44 loc) · 1.41 KB
/
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
41
42
43
44
45
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import * as path from 'path';
import createWebTypes from './utils/web-types/createWebTypes';
import { version } from './package.json';
export default defineConfig({
resolve: {
alias: {
'types': path.resolve(__dirname, '/types'),
// eslint-disable-next-line @typescript-eslint/naming-convention
'@': path.resolve(__dirname, '/src'),
'components': path.resolve(__dirname, 'src/components'),
'helpers': path.resolve(__dirname, 'src/helpers'),
'composables': path.resolve(__dirname, 'src/composables')
}
},
define: {
// eslint-disable-next-line @typescript-eslint/naming-convention
__VUEISH_VERSION__: JSON.stringify(version)
},
build: {
lib: {
entry: path.resolve(__dirname, 'src/main.ts'),
name: 'vueish',
formats: ['cjs', 'es']
},
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ['vue'],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: 'Vue'
}
}
}
},
plugins: [
vue(),
createWebTypes()
]
});