Skip to content

Commit

Permalink
Update readme to prioritize CJS over ESM
Browse files Browse the repository at this point in the history
Inspired by the recent discussion in #137
  • Loading branch information
TehShrike authored Mar 18, 2019
1 parent 94ec8c8 commit 46f49a8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,18 @@ deepmerge can be used directly in the browser without the use of package manager

### Includes

CommonJS:
CommonJS is recommended:

```
var merge = require('deepmerge')
```

ES Modules:
deepmerge doesn't expose an ES Module (true ESM support was removed because of a [Webpack bug](https://github.com/webpack/webpack/issues/6584)), but you can use the ES Module syntax if your bundler supports it and you really want to:

```
import * as deepmerge from 'deepmerge'
import * as merge from 'deepmerge'
```

(support for `import merge from 'deepmerge'` was removed because of a [Webpack bug](https://github.com/webpack/webpack/issues/6584)).


# API


Expand Down

0 comments on commit 46f49a8

Please sign in to comment.