Closed fc closed 2 years ago
Same issue, @fc thanks for the workaround
So the problem is that mapbox-gl-geocoder
needs to specify events
as a dep? But then why would it work outside vite
?
Vite doesn't natively do the Node emulation that other bundlers do. See Parcel docs for these examples: https://parceljs.org/features/node-emulation/
This is still our bug—per say. We should include https://www.npmjs.com/package/events in the dependencies.
Thanks!
Steps:
Reproduce it here: https://replit.com/join/qyvahtyiuq-fc14
Or refer to this code snippet:
Current:
Expected: No error
Seems like this is because I'm using vite as this worked previously.
events
is also not listed as a dependency.Temporary workaround: Install
events