-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
41 lines (38 loc) · 1.2 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
import {sveltekit} from '@sveltejs/kit/vite';
import {SvelteKitPWA} from '@vite-pwa/sveltekit';
import path from 'path';
/** @type {import('vite').UserConfig} */
const config = {
plugins: [sveltekit(), SvelteKitPWA({
workbox: {
globPatterns: ['**/*.{js,css,html,svg,png,woff2}'],
maximumFileSizeToCacheInBytes: 5000000,
},
registerType: "prompt",
strategies: "generateSW",
scope: '/',
start_url: '/',
manifest: {
"background_color": "#ffffff",
"theme_color": "#7E1F86",
"name": "alexwang.net",
"short_name": "alexwang.net",
"start_url": "/",
"display": "standalone",
"icons": [
{
"src": "/favicon.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable any"
}
]
}
})],
ssr: {
// We have to add this workaround because of #4504 https://github.com/sveltejs/kit/issues/4504
// In the future DayJS 2.0 will not require this workaround
noExternal: ['dayjs']
}
};
export default config;