-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
37 lines (35 loc) · 884 Bytes
/
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
import react from '@vitejs/plugin-react-swc'
import { VitePWA } from 'vite-plugin-pwa'
import ssr from 'vite-plugin-ssr/plugin'
import tsconfigPaths from 'vite-tsconfig-paths'
import { defineConfig } from 'vite'
export default defineConfig({
plugins: [
tsconfigPaths(),
react(),
ssr({ prerender: true }),
VitePWA({
injectRegister: 'script',
registerType: 'autoUpdate',
workbox: {
maximumFileSizeToCacheInBytes: 10_000_000,
globPatterns: ['**/*.{js,css,html,ico,png,svg}'],
},
manifest: {
name: 'collab-editor',
icons: [
{
src: '/pwa-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: '/pwa-512x512.png',
sizes: '512x512',
type: 'image/png',
},
],
},
}),
],
})