Closed bhison closed 4 years ago
It sounds like the rollup config for your project is building a UMD or IIFE build, but this project uses dynamic imports to load the huuuge mapbox library asynchronously.
My suggestion would be that you should change the output format for your rollup build to ESM, so that this library can be used.
There are some docs on code splitting and esm here: https://rollupjs.org/guide/en/#code-splitting
Not sure if I'm just being inexperienced here, but having tried to use the Map, Geocoder and control components in a standard svelte starter project, rollup is spitting out the above error. Any advice would be massively appreciated!