watergis/mapbox-gl-legend

Using import with the 1.2.0 library causes a build error

Closed this issue · 2 comments

Describe the bug
If the library is imported with import, upgrading from 1.1.7 to 1.2.0 causes an error at build time, about not being able to find mapboxgl.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the demo sandbox
  2. Change the mapbox-gl-legend version in package.json to 1.2.0

As soon as it starts to rebuild, there's an error, shown below.

Expected behavior
No error!

Screenshots

image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Version 95

Additional context
Caused by changes for CDN support?

@fwextensions Thank you for raising the issue! I have fixed it now. Please use v1.2.1.

Thanks for the quick fix! v1.2.1 doesn't show that error now.