-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
89 lines (87 loc) · 1.89 KB
/
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
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
87
88
89
import { sentryVitePlugin } from "@sentry/vite-plugin";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import { VitePWA } from "vite-plugin-pwa";
export default defineConfig({
plugins: [
react(),
VitePWA({
devOptions: {
// enabled: true,
},
registerType: "prompt",
manifestFilename: "manifest.json",
manifest: {
name: "Detrak",
short_name: "Detrak",
description: "The Detrak dice game",
categories: ["game", "casual game", "dice game"],
display: "standalone",
handle_links: "preferred",
theme_color: "#0f1c2e",
background_color: "#0f1c2e",
icons: [
{
src: "manifest-icon-192.maskable.png",
sizes: "192x192",
type: "image/png",
purpose: "any",
},
{
src: "manifest-icon-192.maskable.png",
sizes: "192x192",
type: "image/png",
purpose: "maskable",
},
{
src: "manifest-icon-512.maskable.png",
sizes: "512x512",
type: "image/png",
purpose: "any",
},
{
src: "manifest-icon-512.maskable.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
screenshots: [
{
src: "en-light-landscape.webp",
sizes: "1920x1080",
type: "image/webp",
form_factor: "wide",
},
{
src: "en-light-portrait.webp",
sizes: "1081x2340",
type: "image/webp",
form_factor: "narrow",
},
],
},
includeAssets: ["favicon-196.png", "apple-icon-180.png"],
workbox: {
globPatterns: ["**/*.{js,css,html,woff,woff2}"],
},
}),
sentryVitePlugin({
org: "zwyx",
project: "detrak",
}),
],
resolve: {
alias: [
{
find: "@",
replacement: "/src",
},
],
},
build: {
outDir: "docs",
// Sourcemaps are sent to Sentry but not included in the bundle (see `.github/workflows/build-website.yml`)
sourcemap: true,
},
});