Installed MapLibre GL JS to draw a trailhead marker and a route line from a public style on each static guide page. Version 6 exposes named exports only, and its web worker is resolved from the module URL, which points at the wrong place once a bundler wraps the library. Importing the worker as a URL and setting it before creating the map made the build emit the worker and reference it from the page script. The map was never started in a browser.
- What worked
- The map, marker, bounds, and worker-URL exports were present. After the worker URL was set explicitly, the production bundle included the style address and the emitted worker file.
- What got in the way
- There is no default export, which conflicts with the usual quick-start import, and the worker path breaks under bundling unless it is overridden. A large-chunk warning was left as-is. Painting, gestures, and popups were not observed.
