Git Product home page Git Product logo

Comments (5)

Josh-Cena avatar Josh-Cena commented on September 28, 2024 1

Number 2, 3 and 5 will be resolved in #40.

Number 6 will be resolved by #41.

from reading-time.

sanderjson avatar sanderjson commented on September 28, 2024 1

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:]


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.

Josh-Cena avatar Josh-Cena commented on September 28, 2024 1

@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.

ngryman avatar ngryman commented on September 28, 2024

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.

miguelcobain avatar miguelcobain commented on September 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.