Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Update "Optimizing bundle size" README section #367

Merged
merged 1 commit into from
May 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,18 +231,9 @@ class Component extends React.Component {...}

### Optimizing bundle size

You can reduce your bundle size by only including the modules that you need.

All top-level exports can be imported individually:

```js
import compose from 'recompose/compose'
import mapProps from 'recompose/mapProps'
import withState from 'recompose/withState'
// ... and so on
```

This is the recommended import pattern for library authors.
Since `0.23.1` version recompose got support of ES2015 modules.
To reduce size all you need is to use bundler with tree shaking support
like [webpack 2](https://github.com/webpack/webpack) or [Rollup](https://github.com/rollup/rollup).

#### Using babel-lodash-plugin

Expand Down