-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
107 lines (106 loc) · 2.76 KB
/
vite.config.ts
File metadata and controls
107 lines (106 loc) · 2.76 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import babel from "@rolldown/plugin-babel";
import tailwindcss from "@tailwindcss/vite";
import { tanstackRouter } from "@tanstack/router-plugin/vite";
import react, { reactCompilerPreset } from "@vitejs/plugin-react";
import { nitro } from "nitro/vite";
import { defineConfig } from "vite";
import { VitePWA } from "vite-plugin-pwa";
// https://vite.dev/config/
export default defineConfig({
resolve: {
dedupe: ["react", "react-dom"],
},
plugins: [
nitro(),
VitePWA({
registerType: "autoUpdate",
devOptions: {
// enabled: true,
},
workbox: {
globPatterns: ["**/*.{js,css,html,ico,png,jpg,svg}"],
},
manifest: {
name: "Jamboree26",
short_name: "J26",
// theme_color: "#c61535",
theme_color: "#ffffff",
background_color: "#ffffff",
display: "standalone",
icons: [
{
src: "/web-app-manifest-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "/web-app-manifest-512x512.png",
sizes: "512x512",
type: "image/png",
},
],
// screenshots: [
// {
// src: "/screenshot-1.jpg",
// sizes: "1024x1365",
// type: "image/jpg",
// form_factor: "narrow",
// label: "Malcolm",
// },
// {
// src: "/screenshot-2.jpg",
// sizes: "1024x1365",
// type: "image/jpg",
// form_factor: "narrow",
// label: "Malcolm, igen",
// },
// ],
// TODO: Generate the manifest in the backend so that we can localize it
description: "Jamboree26-appen",
},
}),
tailwindcss(),
tanstackRouter({
target: "react",
autoCodeSplitting: true,
}),
react(),
babel({
presets: [reactCompilerPreset()],
}),
],
nitro: {
serverDir: "./server",
runtimeConfig: {
publicTolgeeApiUrl: "",
publicTolgeeApiKey: "",
publicTolgeeProjectId: "",
publicTolgeeBackendFetchPrefix: "",
publicAppConfigs: "",
publicBottomNavItems: "",
publicAdditionalRootPaths: "",
publicNotificationsTenant: "",
publicDevBannerMessage: "",
publicPayloadApiUrl: "",
publicPayloadLocales: "",
},
devProxy: {
"/auth/**": {
target: "https://app.dev.j26.se/",
changeOrigin: true,
},
"/notifications/**": {
target: "https://app.dev.j26.se/",
changeOrigin: true,
},
"/_services/signupinfo/**": {
target: "https://app.dev.j26.se/",
changeOrigin: true,
},
},
},
// dev server options
server: {
allowedHosts: ["local.j26.se"],
},
});