Skip to content

Open Infrastructure Map, a view of infrastructure data in OpenStreetMap

Split rollup chunks

Russ Garrett1c1c8d6eac10
diff --git a/web/vite.config.ts b/web/vite.config.ts
index 72a3a75..5979f3a 100644
--- a/web/vite.config.ts
+++ b/web/vite.config.ts
@@ -4,7 +4,19 @@ import { renderSVG } from 'vite-plugin-render-svg'
export default defineConfig({
build: {
outDir: './dist',
- chunkSizeWarningLimit: 1000
+ chunkSizeWarningLimit: 1000,
+ rollupOptions: {
+ output: {
+ manualChunks: (id) => {
+ if (id.includes('node_modules/maplibre-gl')) {
+ return 'maplibre'
+ }
+ if (id.includes('node_modules')) {
+ return 'vendor'
+ }
+ }
+ }
+ }
},
plugins: [