-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
74 lines (73 loc) · 1.85 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
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { fileURLToPath, URL } from 'node:url'
import Markdown from 'vite-plugin-vue-markdown'
import path from 'node:path'
import { VitePWA } from 'vite-plugin-pwa'
export default defineConfig({
plugins: [
vue({
include: [/\.vue$/, /\.md$/],
}),
Markdown(),
VitePWA({
mode: "development",
base: "/",
srcDir: "src",
filename: "sw.ts",
strategies: "injectManifest",
manifest: {
name: "Boni 💼",
short_name: 'Boni-Portfolio',
description: 'a webpage to showcase my experience, education, skill-set, projects, certificates, achievements and recommendations.',
theme_color: '#ffffff',
start_url: "/",
display: "standalone",
icons: [
{
src: 'icon-72x72.png',
sizes: '72x72',
type: 'image/png'
},
{
src: 'icon-128x128.png',
sizes: '128x128',
type: 'image/png'
},
{
src: 'icon-144x144.png',
sizes: '144x144',
type: 'image/png'
},
{
src: 'icon-192x192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: 'icon-512x512.png',
sizes: '512x512',
type: 'image/png'
}
]
}
})
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
'components': path.resolve(__dirname, './src/components'),
}
},
build: {
rollupOptions: {
output:{
manualChunks(id) {
if (id.includes('node_modules')) {
return id.toString().split('node_modules/')[1].split('/')[0].toString();
}
}
}
}
}
})