Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

Commit 6e7ebe0

Browse files
committed
docs: add note on browser shimming to readmewq
License: MIT Signed-off-by: Jacob Heun <[email protected]>
1 parent 8093ad5 commit 6e7ebe0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
- [Install](#install)
1818
- [Usage](#usage)
19+
- [Browser Shimming Leveldown](#browser-shimming-leveldown)
1920
- [Contribute](#contribute)
2021
- [License](#license)
2122

@@ -39,6 +40,9 @@ const browserStore = new LevelStore('my/db/name', {db: require('level-js')})
3940
const memStore = new LevelStore('my/mem/store', {db: require('memdown')})
4041
```
4142

43+
### Browser Shimming Leveldown
44+
As `leveldown` does not work in the browser, `LevelStore` takes advantage of the browser property in package.json to shim `level-js` in its place. Most modern bundlers such as webpack, will see the shim and replace it for use in the browser. If you are using a bundler that does not support pkg.browser, you will need to handle the shimming yourself, as was the case with versions of `LevelStore` 0.7.0 and earlier.
45+
4246
## Contribute
4347

4448
PRs accepted.

0 commit comments

Comments
 (0)