-
Notifications
You must be signed in to change notification settings - Fork 103
Expand file tree
/
Copy pathvite.config.ts
More file actions
28 lines (27 loc) · 752 Bytes
/
Copy pathvite.config.ts
File metadata and controls
28 lines (27 loc) · 752 Bytes
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
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { VitePWA, VitePWAOptions } from "vite-plugin-pwa";
import manifest from './manifest.json';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
VitePWA({
registerType: "autoUpdate",
includeAssets: ["favicon.ico"],
manifest: manifest as VitePWAOptions['manifest'],
devOptions: {
enabled: true,
type: "module",
navigateFallback: "index.html",
},
workbox: {
globPatterns: ["**/*.{js,css,html,ico,png,svg}"],
cleanupOutdatedCaches: true,
sourcemap: true,
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024,
},
})
],
base: "",
});