forked from n8n-io/n8n
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.ts
42 lines (41 loc) · 996 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
41
42
import { createVuePlugin } from 'vite-plugin-vue2';
import { resolve } from 'path';
export default {
plugins: [
createVuePlugin(),
],
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
'vue2-boring-avatars': resolve(__dirname, '..', '..', 'node_modules', 'vue2-boring-avatars', 'dist', 'vue-2-boring-avatars.umd.js'),
// 'vue2-boring-avatars': 'vue2-boring-avatars/dist/vue-2-boring-avatars.umd.js',
},
},
build: {
lib: {
entry: resolve(__dirname, 'src', 'main.js'),
name: 'N8nDesignSystem',
fileName: (format) => `n8n-design-system.${format}.js`,
},
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ['vue'],
output: {
exports: 'named',
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: 'Vue',
},
},
},
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: [
'./src/__tests__/setup.ts',
],
},
};