Comments (5)
Number 2, 3 and 5 will be resolved in #40.
Number 6 will be resolved by #41.
from reading-time.
Just jumping in to say that, with my current setup,
v1.4.0
worked fine without any changes, but updating tov1.5.0
required me to add the following to my webpack config:]
Not sure if this is the same issue but I had problems with 1.5 on Vite. Using 1.4 for now.
util.inherits is not a function
TypeError: util.inherits is not a function
from reading-time.
@sanderjson Yes, your problem is the same as the previous one. util
is a Node library and is not polyfilled by Vite. You can either use 1.4, use 2.0.0-1 (which has a browser
field in package.json), or import from reading-time/lib/reading-time
instead.
from reading-time.
All of this sounds great to me, thanks!
I finally moved so I should be more available starting next week. I should be able to help here.
Ref #18 for stuff related to the API changes.
from reading-time.
Just jumping in to say that, with my current setup, v1.4.0
worked fine without any changes, but updating to v1.5.0
required me to add the following to my webpack config:
node: {
global: true
},
resolve: {
fallback: {
stream: 'stream-browserify'
}
},
plugins: [
new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer']
})
]
and had to install stream-browserify
.
The problematic line was const Transform = require('stream').Transform
, but this line is also present in v1.4.0
. This is a node core package, so it is expected for some kind of polyfill to be needed, but for some strange reason, v1.4.0
just works without any particular configuration change. 🤷♂️
from reading-time.
Related Issues (20)
- An in-range update of mocha is breaking the build 🚨 HOT 7
- TypeScript definitions HOT 5
- i18n or change "min read" HOT 4
- Change the API HOT 8
- Breaking changes after patch update HOT 3
- question on API HOT 3
- require('reading-time/stream') is not found HOT 1
- Does the current version only support text but not `markdown` and `html`? HOT 2
- v1.5.0 requires additional Webpack config HOT 17
- Help us complete the word counting algorithm!
- Generate a code playground HOT 6
- Cannot find module 'readingTime' or its corresponding type declarations. HOT 2
- It would be nice to have .js (and min) file for vanilla JS projects
- Suggestion: Japanese reading-time HOT 8
- Math.round Minutes by default HOT 2
- readingTimeWithCount() not exported HOT 2
- Use hours for reading times > 60 min
- Change Words Per Minute `wpm` in `options` so you can change it HOT 2
- Missing License HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reading-time.