-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
47 lines (45 loc) · 1.34 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
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import { VitePWA, VitePWAOptions } from "vite-plugin-pwa";
import { nodePolyfills } from "vite-plugin-node-polyfills";
import wasm from "vite-plugin-wasm";
const manifestForPlugin: Partial<VitePWAOptions> = {
registerType: "autoUpdate",
includeAssets: ["favicon.ico", "pwa-192x192.png", "pwa-512x512.png"],
manifest: {
name: "Quickplot",
short_name: "Quickplot",
description: "Plot data",
theme_color: "#ffffff",
//start_url: "/",
//background_color: "ffffff",
//display: "standalone",
//orientation: "portrait",
icons: [
{
src: "pwa-512x512.png",
type: "image/png",
sizes: "512x512",
},
{
src: "pwa-192x192.png",
type: "image/png",
sizes: "192x192",
},
{
src: "pwa-512x512.png",
type: "image/png",
sizes: "512x512",
purpose: "maskable",
},
],
},
};
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), VitePWA(manifestForPlugin), nodePolyfills(), wasm()],
base: "/quickplot/",
build: {
target: "esnext",
},
});