-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
54 lines (52 loc) · 1.49 KB
/
vite.config.js
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
46
47
48
49
50
51
52
53
54
import {fileURLToPath, URL} from 'node:url'
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import {resolve} from 'path'
import {version} from './package.json'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
define: {
__APP_VERSION__: JSON.stringify(version),
},
build: {
lib: {
entry: resolve(__dirname, 'src/main.js'),
name: 'GlycerineViewer',
fileName: (format) => `glycerine-viewer.${format}.js`,
},
rollupOptions: {
external: [
'vue',
'@recogito/annotorious-openseadragon',
'axios',
'moment',
'openseadragon',
'primeflex',
'primeicons',
'primevue',
/primevue\/.*/,
/primeflex\/.*/,
/primeicons\/.*/,
],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: 'Vue',
axios: 'axios',
moment: 'moment',
openseadragon: 'OpenSeadragon',
'@recogito/annotorious-openseadragon': 'Annotorious',
},
},
},
}
});