forked from Adamant-im/adamant-im
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite-android.config.ts
More file actions
32 lines (30 loc) · 861 Bytes
/
vite-android.config.ts
File metadata and controls
32 lines (30 loc) · 861 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
import { mergeConfig, defineConfig } from 'vite'
import { VitePWA } from 'vite-plugin-pwa'
import viteBaseConfig from './vite-base.config'
import { manifest } from './vite-config/manifest'
import { excludeScreenshotsPlugin } from './vite-config/plugins/excludeScreenshotsPlugin'
export default mergeConfig(
viteBaseConfig,
defineConfig({
build: {
outDir: './dist-android'
},
plugins: [
VitePWA({
registerType: 'autoUpdate',
srcDir: 'src',
filename: 'service-worker.js',
devOptions: {
enabled: false
},
manifest: manifest,
manifestFilename: 'manifest.json',
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,wasm}'],
maximumFileSizeToCacheInBytes: 5000000 // 5 MiB
}
}),
excludeScreenshotsPlugin()
]
})
)