-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
36 lines (35 loc) · 945 Bytes
/
vite.config.ts
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
import { sveltekit } from "@sveltejs/kit/vite";
import { defineConfig, loadEnv } from "vite";
import { SvelteKitPWA } from "@vite-pwa/sveltekit";
import { APP_DESCRIPTION, APP_NAME } from "./src/lib/const";
export default defineConfig(({ mode }) => {
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) };
return {
server: {
host: true,
},
plugins: [
sveltekit(),
SvelteKitPWA({
manifest: {
name: APP_NAME,
short_name: APP_NAME,
description: APP_DESCRIPTION,
theme_color: "#ffffff",
icons: [
{
src: process.env.VITE_PWA_ICON_192_PATH,
sizes: "192x192",
type: "image/png",
},
{
src: process.env.VITE_PWA_ICON_512_PATH,
sizes: "512x512",
type: "image/png",
},
],
},
}),
],
};
});