Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tree-shakable #19

Open
manlyman29 opened this issue Apr 26, 2023 · 10 comments · May be fixed by #20
Open

Tree-shakable #19

manlyman29 opened this issue Apr 26, 2023 · 10 comments · May be fixed by #20

Comments

@manlyman29
Copy link

It seems like the package cannot undergo tree-shaking, which may not be a critical concern for mobile or desktop applications. However, in a web context, it would result in an extra 2.9MB download during the initial launch of the application. It is hoped that a solution has been documented to avoid this download and ensure the exclusion of the additional font files from the final bundle.

@JulioCGMC
Copy link

Any develop on this bug? I'm not being able to use vector_icons on my app because of this.

@TommyLCox
Copy link

@JulioCGMC - It looks like we are going to have to pull this package out of our web application and find replacements for the icons that we used. I really don't understand what one would have to do to make avoid getting the icons we want to use in the web app from being 'tree shaken' out of the build. Obviously, turning off tree-shaking sounds bad as it just increases your build size. I am wondering if there is something that can be put in a pubspec to require the certain font families to be loaded and allow others to be shaken out?

@richard457
Copy link

Facing same issue as well

@JoeGMendes
Copy link

Same here. Any update?

1 similar comment
@henri-mabiti
Copy link

Same here. Any update?

mlsm-trl added a commit to trial-trl/flutter-vector-icons that referenced this issue Sep 20, 2023
@snitkoff
Copy link

Any news???

@royhanrahim
Copy link

Same here. Any update?

@victoreronmosele
Copy link

Hi everyone,

I have fixed the tree-shaking error and created a PR to introduce it into the repo.

While the PR is being reviewed, you can use my fork as a git dependency to install the fixed package like this:

dependencies:
  flutter_vector_icons: 
    git: 
      url: https://github.com/victoreronmosele/flutter-vector-icons.git
      ref: v3.0.0

Looking forward to your feedback!

@royhanrahim
Copy link

Hi @victoreronmosele

That means if I want to use the latest version of Flutter using your version of flutter_vector_icons, can I ?

@victoreronmosele
Copy link

victoreronmosele commented Oct 20, 2023

@royhanrahim, yes, you can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants