Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package import broken without build #269

Open
cafca opened this issue Nov 28, 2020 · 0 comments
Open

Package import broken without build #269

cafca opened this issue Nov 28, 2020 · 0 comments

Comments

@cafca
Copy link

cafca commented Nov 28, 2020

The distribution currently does not include built files. In version 3.1.3 this was included at dist/. Even then it was not documented but people found a workaround to use this in their code.

Please return to publishing the dist directory and ideally change the main entry point to that as well (or visibly document how to import this lib for use in a browser environment).

C.f. https://mykeels.medium.com/node-how-to-handle-your-dist-files-9667f47316ab

Thanks!

Edit: If anybody finds this issue looking for a way to use mapbox-gl-directions in a Webpack setup, I was able to work around this issue by including the full bundle as well as the css definitions in my source code. In addition, I had to use import * as MapboxDirections for the import and manually call directions.mapState() after adding the control to my (fully loaded) map instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant