GithubHelp home page GithubHelp logo

Tree shaking about react HOT 7 CLOSED

phosphor-icons avatar phosphor-icons commented on April 24, 2024 2
Tree shaking

from react.

Comments (7)

devrnt avatar devrnt commented on April 24, 2024 1

Has been fixed for me in version 1.0.1

from react.

rektdeckard avatar rektdeckard commented on April 24, 2024

@lednhatkhanh looks like a regression when we switched to using Parcel Rollup, I'll make sure it's fixed up in the next release!

from react.

devrnt avatar devrnt commented on April 24, 2024

Seems like the ES module export is not discovered according to bundlephobia: https://bundlephobia.com/[email protected]

from react.

rektdeckard avatar rektdeckard commented on April 24, 2024

@devrnt that's the vanilla JS lib you're inspecting, not the React lib

from react.

devrnt avatar devrnt commented on April 24, 2024

@rektdeckard Oops my bad, thanks to point out

from react.

devrnt avatar devrnt commented on April 24, 2024

Seems like same behaviour is occuring in a default nextjs project. (see README.md)

https://github.com/devrnt/nextjs-phosphor-react

  • Branch master conains the size of next build without the use of phosphor-react.
  • Branch phosphor-react has an import of the Hand component from phosphor-react in pages/index.js.

TLDR: First load JS size

  • without use of phosphor-react: 65.1 kB
  • with phosphor-react: 285 kB (even when just using one icon, all icons are included in bundle)

from react.

rektdeckard avatar rektdeckard commented on April 24, 2024

Yep, fixed up Rollup config in 78dec00. Glad to hear it's working for you!

from react.

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.