-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.js
77 lines (68 loc) · 1.45 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import { fileURLToPath, URL } from 'node:url'
import { resolve } from 'path'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import Unfonts from 'unplugin-fonts/vite'
// https://vitejs.dev/config/
export default defineConfig({
css: {
preprocessorOptions: {
scss: {
additionalData: `@import "@/scss/custom/base-theme/support/index.scss";`
}
}
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./lib', import.meta.url))
},
dedupe: ['vue']
},
plugins: [
vue(),
Unfonts({
google: {
families: [
{
name: 'Open Sans',
styles: 'wght@300;400;600;700'
},
{
name: 'Roboto Slab',
styles: 'wght@300;400;600;700'
}
]
}
})
],
build: {
cssCodeSplit: undefined,
assetsInlineLimit: 0,
minify: true,
lib: {
// eslint-disable-next-line no-undef
entry: resolve(__dirname, 'lib/index.js'),
name: 'Vuersatile Components',
fileName: 'vuersatile-components',
formats: ['es'],
emitAssets: true
},
rollupOptions: {
external: ['vue'],
output: {
globals: {
vue: 'Vue'
}
},
sourceMap: false
},
},
optimizeDeps: {
exclude: ['vue'],
},
define: {
__VUE_I18N_FULL_INSTALL__: true,
__VUE_I18N_LEGACY_API__: false,
__INTLIFY_PROD_DEVTOOLS__: false,
}
})