-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
86 lines (85 loc) · 2.12 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
75
76
77
78
79
80
81
82
83
84
85
86
import { sveltekit } from "@sveltejs/kit/vite";
import mkcert from "vite-plugin-mkcert";
import { defineConfig } from "vite";
import { resolve } from "path";
import svg from "@poppanator/sveltekit-svg";
import { SvelteKitPWA } from "@vite-pwa/sveltekit";
import { purgeCss } from "vite-plugin-tailwind-purgecss";
export default defineConfig({
server: {
host: "dev.workout-tracker.com",
watch: {
usePolling: true,
},
proxy: {},
},
resolve: {
alias: {
$: resolve("./src"),
},
},
define: {
"process.env.NODE_ENV":
process.env.NODE_ENV === "production" ? '"production"' : '"development"',
},
plugins: [
sveltekit(),
purgeCss(),
mkcert(),
svg({
includePaths: ["./src/lib/icons/"],
}),
SvelteKitPWA({
srcDir: "src",
strategies: "injectManifest",
filename: "service-worker.ts",
base: "/",
devOptions: {
enabled: true,
type: "module",
},
injectManifest: {
globPatterns: ["client/**/*.{js,css,ico,png,svg,webp,woff,woff2}"],
},
workbox: {
globPatterns: ["client/**/*.{js,css,ico,png,svg,webp,woff,woff2}"],
swDest: "service-worker.js",
},
manifest: {
short_name: "Workout Tracker",
name: "Workout Tracker",
description: "The minimal workout tracking app",
start_url: "/auth/login",
scope: "/",
display: "standalone",
theme_color: "#000000",
background_color: "#ffffff",
orientation: "portrait",
icons: [
{
src: "/pwa-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "/pwa-512x512.png",
sizes: "512x512",
type: "image/png",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "any",
},
{
src: "maskable-icon-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
},
}),
],
});