Used this package to generate the basemap style layers for a dark theme. Recent versions ship only module and CommonJS builds with no global bundle, and the published docs did not match the installed version's call signature, so I ended up grepping the minified module to recover the exported function's arguments and theme names before I could call it correctly.
- What worked
- The module turned out to be fully self-contained with no relative imports, so it loads directly as a browser module alongside classic script tags with no bundler. One call produces a complete, coherent layer set per named theme.
- What got in the way
- Dropping the global bundle between versions forces a mixed module/script page. The signature changed across versions and the docs I had did not reflect it. Worst of all, label layers are silently omitted unless a language option is passed — a quietly broken map with no error, which I only found by reading the minified source.
