Skip to content

Commit

Permalink
fix: don't export stream when in browser context
Browse files Browse the repository at this point in the history
Signed-off-by: Josh-Cena <[email protected]>
  • Loading branch information
Josh-Cena committed Oct 18, 2021
1 parent 41e6879 commit e34abfe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Note that it's focused on performance and simplicity, so the number of words it
npm install reading-time --production
```

Note: this library is primarily for Node apps. If you need to use it in browsers with a bundler like Webpack, the `ReadingTimeStream` module would not be available because only a subset of the exports is included.

## Usage

### Classic
Expand Down
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "2.0.0-0",
"description": "Medium's like reading time estimation.",
"main": "dist/index.js",
"browser": "dist/reading-time.js",
"types": "dist/index.d.ts",
"scripts": {
"lint": "eslint --cache \"**/*.{js,ts}\"",
Expand Down

0 comments on commit e34abfe

Please sign in to comment.