tabler / tabler-icons

A set of over 5700 free MIT-licensed high-quality SVG icons for you to use in your web projects.
https://tabler.io/icons
MIT License
18.31k stars 914 forks source link

@tabler/icons-react-native 3.X.X bundle size issue #1229

Open YadBro opened 1 month ago

YadBro commented 1 month ago

Description

Similar to issue #1215 (svelte)

The package has sideEffects set to false, but I still end up with a large APK size.

The package size for @tabler/icons-react-native version 3.14.0 is around 44 MB.

Package

Version

3.14.0

Browser

Operating system

Steps to reproduce

  1. Create a react-native project with npx @react-native-community/cli@latest init MyApp
  2. import { IconHome } from "@tabler/icons-react-native";
  3. Build apk with ./gradlew assembleRelease
  4. Notice the huge bundle size

Checklist

Honzoraptor31415 commented 1 month ago

Similar issue here, I just tried to use @tabler/icons-react-native in my React Native project, but the app takes a super long time to bundle. I don't know the exact time, but I stopped the bundling proccess after like 10 seconds - keep in mind that the project (at this point) is small and normally only takes about 2 seconds to bundle.

Also I use Expo Go to view and debug the app.

YadBro commented 1 month ago

After hours of "wtf is happening!?" I avoided this problem by using v.3.17.0.

Umm.. I tried switching to version 3.19.0, but it did not solve the issue. I also attempted using the suggested version 3.17.0, but the problem persists.

If the issue is solved, my APK size will no longer be around 71MB; it will likely be reduced to around 30MB.

image
OscarMpy commented 1 month ago

I also have this issue using expo/metro bundler. The amount of modules bundled goes from 1600 to around 7300 using "@tabler/icons-react-native": "^3.19.0". I tried messing around with the bundler config to no avail.

jpriollaud commented 2 weeks ago

Confirmed. Tabler is unusable all versions of 3.XX

sethen commented 2 weeks ago

Same issue here, crashes my mantine project every time.