-
Notifications
You must be signed in to change notification settings - Fork 151
Expand file tree
/
Copy pathvite.umd.config.ts
More file actions
155 lines (154 loc) · 6.21 KB
/
Copy pathvite.umd.config.ts
File metadata and controls
155 lines (154 loc) · 6.21 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
import vue from "@vitejs/plugin-vue";
import { fileURLToPath, URL } from "url";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
"@components": fileURLToPath(
new URL("./src/components", import.meta.url),
),
"@demos": fileURLToPath(new URL("./src/demos", import.meta.url)),
},
preserveSymlinks: false,
dedupe: ["vue"],
extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".vue"],
},
build: {
cssCodeSplit: false, // UMD should have single CSS file
emptyOutDir: false, // Don't clean dist, allow multiple builds
lib: {
entry: fileURLToPath(new URL("./src/index.ts", import.meta.url)),
name: "vue3-openlayers",
formats: ["umd"],
fileName: (format) => `vue3-openlayers.${format}.js`,
},
minify: false,
rollupOptions: {
// make sure to externalize deps that should not be bundled
// into your library
external: ["vue", /^ol.*/, /^@turf.*/], // Avoid bundling ol imports into the final build
output: {
exports: "named",
globals: {
vue: "Vue",
ol: "ol",
"ol/control": "control",
"ol/control/Attribution": "Attribution",
"ol/control/FullScreen": "FullScreen",
"ol/control/MousePosition": "MousePosition",
"ol/control/OverviewMap": "OverviewMap",
"ol/control/ScaleLine": "ScaleLine",
"ol/control/Rotate": "Rotate$1",
"ol/control/Zoom": "Zoom",
"ol/control/ZoomSlider": "ZoomSlider",
"ol/control/ZoomToExtent": "ZoomToExtent",
"ol/easing": "animations",
"ol/extent": "extent",
"ol/events/condition": "selectconditions",
"ol/Feature": "Feature",
"ol/format": "format",
"ol/functions": "functions",
"ol/Geolocation": "Geolocation",
"ol/geom": "geom",
"ol/geom/Circle": "Circle",
"ol/geom/Geometry": "Geometry",
"ol/geom/LineString": "LineString",
"ol/geom/MultiLineString": "MultiLineString",
"ol/geom/MultiPoint": "MultiPoint",
"ol/geom/MultiPolygon": "MultiPolygon",
"ol/geom/Point": "Point$2",
"ol/geom/Polygon": "Polygon",
"ol/interaction": "interaction",
"ol/interaction/defaults": "defaults",
"ol/interaction/Draw": "Draw",
"ol/interaction/DragBox": "DragBox",
"ol/interaction/DragRotate": "DragRotate",
"ol/interaction/DragRotateAndZoom": "DragRotateAndZoom",
"ol/interaction/Link": "Link",
"ol/interaction/Modify": "Modify",
"ol/interaction/MouseWheelZoom": "MouseWheelZoom",
"ol/interaction/Pointer": "Pointer",
"ol/interaction/Select": "Select",
"ol/interaction/Snap": "Snap",
"ol/layer": "Layer",
"ol/layer/Group": "LayerGroup",
"ol/layer/Heatmap": "HeatmapLayer",
"ol/layer/Graticule": "GraticuleLayer",
"ol/layer/Image": "ImageLayer",
"ol/layer/Tile": "TileLayer",
"ol/layer/Vector": "VectorLayer",
"ol/layer/VectorImage": "VectorImageLayer",
"ol/layer/VectorTile": "VectorLayerTile",
"ol/layer/WebGLPoints": "WebGLPointsLayer",
"ol/layer/WebGLTile": "TileLayer$1",
"ol/layer/WebGLVector": "WebGLVectorLayer",
"ol/loadingstrategy": "loadingstrategy",
"ol/Map": "Map$1",
"ol/Overlay": "Overlay",
"ol/proj": "proj",
"ol/proj/proj4": "proj4$1",
"ol/proj/Projection": "Projection$1",
"ol/renderer/webgl/VectorLayer": "WebGLVectorLayerRenderer",
"ol/source": "source",
"ol/source/BingMaps": "BingMaps",
"ol/source/Cluster": "Cluster",
"ol/source/ImageStatic": "Static",
"ol/source/Image": "ImageSource",
"ol/source/ImageWMS": "ImageWMS",
"ol/source/GeoTIFF": "GeoTIFF",
"ol/source/OSM": "OSM",
"ol/source/StadiaMaps": "StadiaMaps",
"ol/source/Tile": "Tile",
"ol/source/TileArcGISRest": "TileArcGISRest",
"ol/source/TileDebug": "TileDebug",
"ol/source/TileJSON": "TileJSON",
"ol/source/TileWMS": "TileWMS",
"ol/source/Vector": "VectorSource",
"ol/source/VectorTile": "VectorSourceTile",
"ol/source/WMTS": "WMTSSource",
"ol/source/XYZ": "XYZ",
"ol/tilegrid": "tilegrid",
"ol/tilegrid/WMTS": "TileGridWMTS",
"ol/View": "View",
"ol/style/Style": "Style",
"ol/style/Circle": "CircleStyle",
"ol/style/Fill": "Fill",
"ol/style/Stroke": "Stroke",
"ol/style/Icon": "Icon",
"ol/style/Text": "Text",
"ol-contextmenu": "ContextMenu",
"ol-ext/control/Button": "Button",
"ol-ext/control/Bar": "Bar",
"ol-ext/control/LayerSwitcher": "LayerSwitcher",
"ol-ext/control/LayerSwitcherImage": "LayerSwitcherImage",
"ol-ext/control/PrintDialog": "PrintDialog",
"ol-ext/control/Swipe": "Swipe",
"ol-ext/control/Search": "Search",
"ol-ext/control/Toggle": "Toggle",
"ol-ext/control/VideoRecorder": "VideoRecorder",
"ol-ext/control/MapZone": "MapZone",
"ol-ext/control/Profile": "Profile",
"ol-ext/featureanimation/Drop": "Drop",
"ol-ext/featureanimation/Fade": "Fade",
"ol-ext/featureanimation/Path": "Path",
"ol-ext/featureanimation/Shake": "Shake",
"ol-ext/featureanimation/Slide": "Slide",
"ol-ext/featureanimation/Teleport": "Teleport",
"ol-ext/featureanimation/Zoom": "Zoom$1",
"ol-ext/interaction/SelectCluster": "SelectCluster",
"ol-ext/interaction/Synchronize": "Synchronize",
"ol-ext/interaction/Transform": "Transform$1",
"ol-ext/layer/AnimatedCluster": "AnimatedCluster",
"ol-ext/style/FlowLine": "FlowLine",
},
assetFileNames: (assetInfo) => {
return assetInfo.name === "main.css"
? "styles.css"
: assetInfo.name || "";
},
},
},
},
});