BeTomorrow / micro-observables

A simple Observable library that can be used for easy state management in React applications.
MIT License
104 stars 8 forks source link

Add ES module distribution #13

Closed itsMapleLeaf closed 4 years ago

itsMapleLeaf commented 4 years ago

For use with modern bundling tools like Vite and Snowpack. At the moment, Vite tries to optimize the library as a CommonJS module with a single default export, then errors with this at runtime:

Uncaught SyntaxError: The requested module '/@modules/micro-observables.js' does not provide an export named 'observable'

Adding an ES module distribution would fix this. I'm also open to adding this myself

itsMapleLeaf commented 4 years ago

Ah, just noticed this is already in place in the 1.5.0 RC versions, very nice. Closing 😄