Skip to content

Commit e34abfe

Browse files
committed
fix: don't export stream when in browser context
Signed-off-by: Josh-Cena <[email protected]>
1 parent 41e6879 commit e34abfe

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Note that it's focused on performance and simplicity, so the number of words it
1919
npm install reading-time --production
2020
```
2121

22+
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.
23+
2224
## Usage
2325

2426
### Classic

package-lock.json

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "2.0.0-0",
44
"description": "Medium's like reading time estimation.",
55
"main": "dist/index.js",
6+
"browser": "dist/reading-time.js",
67
"types": "dist/index.d.ts",
78
"scripts": {
89
"lint": "eslint --cache \"**/*.{js,ts}\"",

0 commit comments

Comments
 (0)