// MapLibre 6 runs as an ES-module worker that imports a shared chunk next to it; copy both // to public/ so they are served with stable names and precached by the service worker. import { copyFile, mkdir } from 'node:fs/promises'; await mkdir('public/maplibre', { recursive: true }); for (const f of ['maplibre-gl-worker.mjs', 'maplibre-gl-shared.mjs']) { await copyFile(`node_modules/maplibre-gl/dist/${f}`, `public/maplibre/${f}`); }