timolins / react-hot-toast

Smoking Hot React Notifications 🔥
https://react-hot-toast.com
MIT License
9.79k stars 331 forks source link

goober dependency isn't being tree-shaken when using headless mode #127

Closed diondiondion closed 2 years ago

diondiondion commented 3 years ago

First off, thanks for creating this library! We were able to replace a home-grown alert handling solution that had a bunch of problems with react-hot-toast's headless mode very easily, and it was a very seamless transition.

The only issue we've run into is that the goober dependency seems to be included in our app's bundle, which we only noticed because it broke our app in IE11 (this was discussed in #58). We managed to work around that issue by letting Babel compile the dependency, but of course the bigger issue is that it shouldn't have been included in the first place, as we only use the toast function and the useToaster hook from this library, and handle the component rendering ourselves.

diondiondion commented 2 years ago

Any news on this @timolins? We're still shipping & having to compile goober in our bundle despite not using it. :( Is this unavoidable?

timolins commented 2 years ago

This is now resolved with v2.3.0 which exposes react-hot-toast/headless.

This import has no dependencies which should resolve this issue.