d4rky-pl / arboris

Hassle-free combination of mobx-state-tree and server-side rendering.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create separate imports for browser and node

d4rky-pl opened this issue · comments

Currently we have configured webpack so it creates browser and node bundle, they share the same code and they're compiled with different presets. It doesn't make sense as the browser bundle does not require almost any of the Arboris code other than the new track function (the middleware is running only on server side and not on client side). Therefore we should create a separate import for the track function so the browser bundle doesn't import entire library.

fixed with #12