You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
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.
The text was updated successfully, but these errors were encountered:
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 useimport * as MapboxDirections
for the import and manually calldirections.mapState()
after adding the control to my (fully loaded) map instance.The text was updated successfully, but these errors were encountered: