flutter-vector-icons
flutter-vector-icons copied to clipboard
Tree-shakable
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.
Any develop on this bug? I'm not being able to use vector_icons on my app because of this.
@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?
Facing same issue as well
Same here. Any update?
Same here. Any update?
Any news???
Same here. Any update?
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!
Hi @victoreronmosele
That means if I want to use the latest version of Flutter using your version of flutter_vector_icons, can I ?
@royhanrahim, yes, you can.