bernabe9 / redux-react-session

:key: Simple Session API storage for Redux and React
https://bernabe9.github.io/redux-react-session/
147 stars 41 forks source link

Immutable Dependency Added to Projects That Don't Use ImmutableReducer #40

Closed mgmarlow closed 4 years ago

mgmarlow commented 6 years ago

Due to the way index.js defines sessionService and exports ImmutableReducer, there is no way to import sessionService without also importing Immutable. This adds an extra 60kb to our app load, despite the fact ImmutableReducer is never used.

To solve this, break sessionService into a separate file so it can be imported directly:

import sessionService from 'redux-react-session/dist/sessionService`