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`
Due to the way
index.js
definessessionService
and exportsImmutableReducer
, there is no way to importsessionService
without also importingImmutable
. This adds an extra 60kb to our app load, despite the factImmutableReducer
is never used.To solve this, break
sessionService
into a separate file so it can be imported directly: