flutter-vector-icons icon indicating copy to clipboard operation
flutter-vector-icons copied to clipboard

Tree-shakable

Open lume-code opened this issue 1 year ago • 10 comments

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.

lume-code avatar Apr 26 '23 09:04 lume-code

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

JulioCGMC avatar Jun 13 '23 16:06 JulioCGMC

@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?

TommyLCox avatar Jun 23 '23 21:06 TommyLCox

Facing same issue as well

richard457 avatar Aug 09 '23 03:08 richard457

Same here. Any update?

JoeGMendes avatar Aug 13 '23 20:08 JoeGMendes

Same here. Any update?

henri-mabiti avatar Aug 31 '23 15:08 henri-mabiti

Any news???

snitkoff avatar Sep 29 '23 15:09 snitkoff

Same here. Any update?

royhanrahim avatar Oct 02 '23 07:10 royhanrahim

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!

victoreronmosele avatar Oct 20 '23 03:10 victoreronmosele

Hi @victoreronmosele

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

royhanrahim avatar Oct 20 '23 03:10 royhanrahim

@royhanrahim, yes, you can.

victoreronmosele avatar Oct 20 '23 03:10 victoreronmosele