-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathd2.config.js
More file actions
76 lines (65 loc) · 1.52 KB
/
d2.config.js
File metadata and controls
76 lines (65 loc) · 1.52 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
const omitPatterns = [
// User info
'me/authorization',
'me\\?fields',
// Settings
'systemSettings',
'userSettings',
// Data
'externalMapLayers',
'geoFeatures',
'analytics',
'tracker/trackedEntities',
// Metadata
'dataElements',
'trackedEntityAttributes',
'optionSets',
'legendSets',
'programs',
'programStages',
'trackedEntityTypes',
'relationshipTypes',
'organisationUnitLevels',
'organisationUnitGroupSets',
]
const config = {
type: 'app',
name: 'maps',
id: 'ad3a9d16-e56f-48a9-a9ed-b906d5646e74',
title: 'Maps',
minDHIS2Version: '2.40',
pluginType: 'DASHBOARD',
pwa: {
enabled: true,
caching: {
patternsToOmitFromAppShell: [
new RegExp(`^(?!.*(${omitPatterns.join('|')})).*$`),
],
globsToOmitFromPrecache: ['fonts/**', 'images/**'],
},
},
viteConfigExtensions: {
optimizeDeps: {
esbuildOptions: {
target: 'es2022',
},
},
build: {
target: 'es2022',
rollupOptions: {
output: {
manualChunks: {
'maps-gl': ['@dhis2/maps-gl'],
},
},
},
},
},
entryPoints: {
app: './src/AppWrapper.jsx',
plugin: './src/PluginWrapper.jsx',
},
coreApp: true,
dataStoreNamespace: 'DHIS2_MAPS_APP_CORE',
}
module.exports = config