forked from Tommertom/ionic-sveltekit-ssr-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
39 lines (34 loc) · 841 Bytes
/
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
import { sveltekit } from '@sveltejs/kit/vite';
import { SvelteKitPWA } from '@vite-pwa/sveltekit';
import { VitePWA } from 'vite-plugin-pwa';
const pwaManifest = {
name: "Ionic SSR demo",
short_name: "IonicSSRDemo",
description: "Ionic SSR demo",
theme_color: '#f27649',
orientation: "portrait",
start_url: "/app/splash",
icons: [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable any"
}
]
}
const pwaConfiguration = {
outDir: './static',
includeAssets: ['favicon.svg', 'favicon.ico', 'robots.txt', 'apple-touch-icon.png', 'dist/*'],
base: '/',
scope: '/',
manifest: pwaManifest
}
/** @type {import('vite').UserConfig} */
const config = {
plugins: [sveltekit(),
// VitePWA(pwaConfiguration)
SvelteKitPWA(pwaConfiguration)
]
};
export default config;