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

v2 MRT exports all @tabler/react-icons during dev mode #418

Closed
1 task done
sbsrnt opened this issue Oct 1, 2024 · 8 comments
Closed
1 task done

v2 MRT exports all @tabler/react-icons during dev mode #418

sbsrnt opened this issue Oct 1, 2024 · 8 comments

Comments

@sbsrnt
Copy link

sbsrnt commented Oct 1, 2024

mantine-react-table version

2.0.0-beta.6

react & react-dom versions

18.3.0

Describe the bug and the steps to reproduce it

When working with v2 MRT, the Network tab in devtools is having performance issues because for each tabler icons we get a chunk request thus producing over 5700 requests.
image

FYI I'm not using any tabler icons in that repo.

Minimal, Reproducible Example - (Optional, but Recommended)

  1. Copy minimal example from https://github.com/sbsrnt/wire.
  2. Open network tab and pay attention to the amount of requests that are happening (5.5k+, for each icon chunk).
  3. Go to https://github.com/sbsrnt/wire/blob/master/src/layout/Content/Content.tsx and comment out <LibrariesList /> (or in LibrariesList component, comment out any code related to MRT)
  4. Notice that there are no chunk requests for tabler icons

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No, because I do not have time to dig into it

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
@KevinVandy
Copy link
Owner

This is just during dev mode without any tree shaking though, right?

@sbsrnt
Copy link
Author

sbsrnt commented Oct 2, 2024

This is just during dev mode without any tree shaking though, right?

Yeah seems to be only in dev mode.
Prod for reference: https://sbsrnt.github.io/wire/

I will update the title

@sbsrnt sbsrnt changed the title v2 MRT exports all @tabler/react-icons v2 MRT exports all @tabler/react-icons during dev mode Oct 2, 2024
@KevinVandy
Copy link
Owner

Most likely going to close this since it's expected.

@hamitaksln
Copy link

Anyway to solve this issue? It takes 10-15 seconds to load simple table when dev tools is open. I always use dev tools open so it's really making it harder to use it. It affects development experience a lot. I've tried to merge chunks in vite but couldn't find a way to do that in development mode. I really like this library but because of this issue I cannot use it.

@hamitaksln
Copy link

After hours of debugging, I found that downgrade @tabler/icons-react ^3.19.0 => 3.11.0 fix this issue for me.

@rossmeredith
Copy link

Yeah it's an issue with the icon library - tabler/tabler-icons#1233

@KevinVandy
Copy link
Owner

Yeah, on further looking into that issue, it's not great. I guess a brute force solution would be to just copy the raw icon svgs into the MRT source code and remove tabler icons as a peer dep. Hopefully they just ship a fix though.

@alessandrojcm
Copy link
Collaborator

I will close this as it is an issue with Tabler and it's only in dev mode. Feel free to reopen if this changes.

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

No branches or pull requests

5 participants