-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
44 lines (41 loc) · 1.04 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
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
import { VitePluginFonts } from '@dolu/vite-plugin-fonts'
// https://vitejs.dev/config/
export default defineConfig({
build: {
lib: {
entry: path.resolve(__dirname, "src/main.ts"),
name: '@zerologin/elements',
fileName: (format) => `zerologin.${format}.js`,
},
rollupOptions: {
external: ['~/src/assets/icons/logo.svg'],
},
},
plugins: [
vue({ customElement: true }),
VitePluginFonts({
google: {
baseUrl: 'https://api.fonts.coollabs.io/css2',
families: [{
/**
* Family name (required)
*/
name: 'Inter',
/**
* Family styles
*/
styles: 'wght@400;500;600;700',
/**
* enable non-blocking renderer
* <link rel="preload" href="xxx" as="style" onload="this.rel='stylesheet'">
* default: true
*/
defer: true,
},],
},
}),
]
})