Repository navigation
Expand file tree
/
Copy pathvite.config.ts
More file actions
56 lines (54 loc) · 1.49 KB
/
Copy pathvite.config.ts
File metadata and controls
56 lines (54 loc) · 1.49 KB
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
import {VitePWA} from 'vite-plugin-pwa';
import {defineConfig} from 'vite';
import {resolve} from 'path';
import cesium from 'vite-plugin-cesium';
export default defineConfig({
server: {
strictPort: true,
port: 1234,
},
build: {
sourcemap: true,
assetsDir: 'vassets',
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
permits: resolve(__dirname, 'src/apps/permits/index.html'),
illumination: resolve(__dirname, 'src/apps/illumination/index.html'),
survey: resolve(__dirname, 'src/apps/survey/index.html'),
custom: resolve(__dirname, 'src/apps/custom/index.html'),
// other: resolve(__dirname, "src/apps/ngv-something-else.html"),
},
},
},
plugins: [
VitePWA({
strategies: 'injectManifest',
injectManifest: {
swSrc: 'src/sw.ts',
maximumFileSizeToCacheInBytes: 16e6, // 16mb (because of grid file)
globPatterns: ['**/*.{js,css,html,svg,png,jpeg,jpg,ico,gsb,json,wasm}'],
},
srcDir: 'src',
filename: 'sw.ts',
registerType: 'prompt',
pwaAssets: {
disabled: false,
config: true,
},
manifest: {
name: 'NGV3D',
short_name: 'NGV3D',
description: 'Next-Gen-3D-Viewer applications framework',
theme_color: '#ffffff',
display: 'minimal-ui',
},
devOptions: {
enabled: true,
suppressWarnings: true,
type: 'module',
},
}),
cesium(),
],
});