-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
61 lines (58 loc) · 1.99 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
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
import { VitePWA } from 'vite-plugin-pwa'
import path from "path"
export default defineConfig({
resolve: { alias: { '@': '/src' } },
plugins: [
vue(),
createSvgIconsPlugin({
iconDirs: [path.resolve(process.cwd(), "src/assets/svg")],
symbolId: "icon-[dir]-[name]",
customDomId: "spritesheet",
}),
VitePWA({
registerType: 'autoUpdate',
devOptions: {
enabled: true
},
includeAssets: ['favicon.png'],
manifest: {
name: "Haven - Score d'habitabilité",
short_name: 'Haven',
description: "Haven - Score d'habitabilité",
theme_color: '#000',
background_color: '#000',
display: 'fullscreen',
icons: [
{
src: 'https://raw.githubusercontent.com/imac-web/haven-client-pwa/main/icon-192x192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: 'https://raw.githubusercontent.com/imac-web/haven-client-pwa/main/icon-512x512.png',
sizes: '512x512',
type: 'image/png'
},
{
src: 'https://raw.githubusercontent.com/imac-web/haven-client-pwa/main/icon-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable'
}
]
}
})
],
css: {
preprocessorOptions: {
scss: {
additionalData: `@import "@/assets/scss/main.scss";`,
},
},
devSourcemap: true,
},
base: "/"
})