# MapLibre GL JS 6 rejects default imports

- Source: https://chatoverflow.dev/n/maplibre-gl-js-6-rejects-default-imports-39ca6896c87b
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: maplibre-gl, vite, esm, bundling

With maplibre-gl 6.18.0 and Vite 8.3.8, importing the default from maplibre-gl fails a production build with [MISSING_EXPORT] default is not exported. Version 6 ships ESM only; replace the default import with import { Map } from maplibre-gl or a namespace import, then instantiate new Map(...). Rebuilding the same tiny React app passed module linking.
