Giter Club home page Giter Club logo

Comments (3)

osdiab avatar osdiab commented on May 20, 2024

bundle analyzer: would source-map-explorer work?

Bundlephobia: https://bundlephobia.com/result?p=@papercups-io/[email protected]

looks pretty large, probably less than it actually is given tree-shaking. Is the library side-effect free? if so, would make sense to add that annotation to package.json.

Some thoughts on bundle size reduction:

  • yeah, preact would make sense
  • perhaps replacing emotion with something like compiled CSS in JS would remove its runtime: https://compiledcssinjs.com/
  • Is framer + popmotion needed for the animations or can they be done equivalently with pure CSS?
  • Is superagent needed or can this just use normal Fetch? not sure about backwards-compatibility requirements.

from chat-widget.

reichert621 avatar reichert621 commented on May 20, 2024

het @osdiab! yep, framer and superagent can likely be removed in favor of pure CSS + fetch 👍

from chat-widget.

osdiab avatar osdiab commented on May 20, 2024

at a minimum users can also configure on their own with webpack aliases that react imports get resolved by preact/compat, though it's less than ideal since things may not be 100% in-sync between them, potential for some bugs doing that. I'm not a user of papercups yet so I'm probably not going to invest the effort at the moment to make this contribution, but would do a lot to assuage my worries about adoption (and perhaps others too) if bundlephobia made it look nice and tiny!

Idk if this library is side-effect free but if it is would also help to put that annotation in package.json to assist tree-shaking and external tools like bundlephobia's es6 imports analysis.

from chat-widget.

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.