forked from StellarSplit/StellarSplit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
62 lines (60 loc) · 1.55 KB
/
Copy pathvite.config.ts
File metadata and controls
62 lines (60 loc) · 1.55 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
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import { VitePWA, type VitePWAOptions } from "vite-plugin-pwa";
import path from "path";
const pwaOptions: Partial<VitePWAOptions> = {
registerType: "autoUpdate",
base: "/",
includeAssets: ["favicon.svg", "apple-touch-icon.png", "mask-icon.svg"],
manifest: {
name: "Stellar Split",
short_name: "Stellar Split",
description: "Stellar Split PWA",
theme_color: "#ffffff",
background_color: "#ffffff",
display: "standalone",
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 maskable",
},
],
},
workbox: {
globPatterns: ["**/*.{js,css,html,ico,png,svg,woff2}"],
},
};
// https://vite.dev/config/
export default defineConfig({
plugins: [react(), VitePWA(pwaOptions), tailwindcss()],
define: {
// Some wallet-kit dependencies expect a Node-like `global` in the browser
global: 'globalThis',
},
// @ts-ignore
test: {
globals: true,
environment: 'jsdom',
setupFiles: './src/test/setup.ts',
},
resolve: {
alias: {
"@src": path.resolve(__dirname, "./src"),
"@components": path.resolve(__dirname, "./src/components"),
"@utils": path.resolve(__dirname, "./src/utils"),
},
},
});