Giter VIP home page Giter VIP logo

Comments (5)

101arrowz avatar 101arrowz commented on May 16, 2024 2

I've updated the package as of adf1a5b and v0.4.3 on NPM, try updating. I reread the stack trace in what you linked and it's actually a server-side issue, not client side.

from fflate.

jacogr avatar jacogr commented on May 16, 2024 2

Thanks for the quick turn-around here - I've asked the reporter to update. (I will also try and replicate the issue today, so will provide feedback either way, either from the reporter or myself)

from fflate.

jacogr avatar jacogr commented on May 16, 2024 1

I can’t reproduce with the fix in-place. Thank you very much.

from fflate.

101arrowz avatar 101arrowz commented on May 16, 2024

Hey, thanks for the issue report! I'm still trying to figure out how to make an NPM package reliably support the browser without breaking Node.js. The main problem is exactly this: some environments can't reliably use the "browser" field. I don't quite understand what's happening here, though; is a bundle generated for Node.js being served on the client?

In any case I'll just have to brute force resolve this issue by bundling both the browser and Node runtimes when the Node.js version is loaded, but only load the browser version in the browser. I guess bundle size isn't even an issue in Node, so it works fine.

from fflate.

101arrowz avatar 101arrowz commented on May 16, 2024

On second thoughts, the reality is that tree shaking must be disabled for this to have happened (or the worker import would have been removed), so why not use the UMD build? That supports both Node.js and the browser from a single script.

EDIT: @jacogr please disregard absolutely everything I've said so far, I found the real issue and will resolve it now. Essentially, this package is Node 10+ with --experimental-worker and Node 12+ natively. To make this work for older environments, I simply need to hoist the require call to the function itself so that it is lazy loaded (i.e. only attempted when the caller requests the async version). I'm going to update the package, which should resolve the issues if you update downstream.

from fflate.

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.