xaviergonz / mobx-keystone

A MobX powered state management solution based on data trees with first class support for Typescript, support for snapshots, patches and much more
https://mobx-keystone.js.org
MIT License
549 stars 25 forks source link

Does not work with Snowpack #198

Closed dodas closed 3 years ago

dodas commented 3 years ago

Hey there!

After upgrading to 0.48.1, mobx-keystone stopped working with Snowpack with error: ReferenceError: require is not defined

Here is a explanation of why this happens: https://github.com/snowpackjs/snowpack/discussions/1321 Offending line: https://github.com/xaviergonz/mobx-keystone/blob/master/packages/lib/src/utils/index.ts#L12

xaviergonz commented 3 years ago

Could you check the just released v0.48.3?

dodas commented 3 years ago

It works! Thanks for a nice quick feedback!

xaviergonz commented 3 years ago

No problem 👍