gridstack / gridstack.js

Build interactive dashboards in minutes.
https://gridstackjs.com
MIT License
6.3k stars 1.26k forks source link

Tree shakeable #2707

Closed onx2 closed 2 weeks ago

onx2 commented 2 weeks ago

I just have a question and it didn't see a Discussions tab.

I wanted to know if this package is tree shakeable? Some basic tests I've done show it loads the whole thing when I import like this:

import {
  GridStack,
  type GridStackElement,
  type GridStackNode,
} from "gridstack";

I'm trying out solidJS with this package and will likely use all the functionality with bindings in solid so no worries either way -- and this package isn't massive, but I was just curious if this is something being considered / if it is possible with the current architecture?

Thanks for your time!

adumesny commented 2 weeks ago

There are only a few classes and all are used so not tree stackable. I did try to separate out the interactive part so static grids would load part of the code until editing is needed but that complicated things a lot and couldn't delay load it back then...

onx2 commented 2 weeks ago

Thanks for the quick response!