-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
40 lines (39 loc) · 897 Bytes
/
vite.config.ts
File metadata and controls
40 lines (39 loc) · 897 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
29
30
31
32
33
34
35
36
37
38
39
40
import path from 'node:path';
import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
import { VitePWA } from 'vite-plugin-pwa';
export default defineConfig({
plugins: [
react(),
tailwindcss(),
VitePWA({
strategies: 'injectManifest',
srcDir: 'src',
filename: 'sw.ts',
registerType: 'autoUpdate',
includeAssets: ['vite.svg'],
injectManifest: {
maximumFileSizeToCacheInBytes: 4000000,
swDest: 'dist/sw.js',
},
manifest: {
name: 'Substack Offline',
short_name: 'substack-offline',
description: 'Download substack articles for offline use',
theme_color: '#0A0A0A',
start_url: '/',
display: 'standalone',
orientation: 'portrait',
},
devOptions: {
enabled: true,
},
}),
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
});