-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackup.vite.config.js
59 lines (58 loc) · 1.59 KB
/
backup.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
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// import crossOriginIsolation from "vite-plugin-cross-origin-isolation";
import { VitePWA } from "vite-plugin-pwa";
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import OMT from "@surma/rollup-plugin-off-main-thread";
// https://vite.dev/config/
export default defineConfig({
plugins: [
react(),
VitePWA({
registerType: "autoUpdate",
devOptions: {
enabled: true, // Enable in development mode if needed
},
manifest: {
name: "Wobbegong explorer",
short_name: "WobExp",
description: "Explore datasets from Wobbegong",
theme_color: "#ffffff",
icons: [
{
src: "pwa-192x192.png",
sizes: "192x192",
type: "image/png",
},
// Add more icons as needed
],
},
workbox: {
// Configure Workbox options here if necessary
},
}),
// crossOriginIsolation(),
// {
// name: "configure-response-headers",
// configureServer: (server) => {
// server.middlewares.use((_req, res, next) => {
// res.setHeader("Cross-Origin-Embedder-Policy", "require-corp");
// res.setHeader("Cross-Origin-Opener-Policy", "same-origin");
// next();
// });
// },
// },
],
// worker: {
// plugins: [resolve(), OMT()],
// },
build: {
rollupOptions: {
plugins: [resolve(), commonjs(), OMT()],
},
},
optimizeDeps: {
exclude: ["epiviz.gl"]
}
});