Open probil opened 5 years ago
@probil
I think my worries are similar. Its size seems to grow as its functions become more and more. However, there is an intention to reduce it without increasing it on schedule.
Yes, it would be great to have some way to pick the components needed, or even some precompiled combinations as a start. Currently, the minified version is 145kb, which makes it too large to include for the limited functionality I need.
Any tips on how to how remove components myself would also be helpful.
Surprised this doesnt have more votes/discussion
The core react-moveable
bundle is quite large if youre only using one of the features, like resize.
@jamesopti There is a way to support Tree Shacking only in react, and you can reduce the size.
import * as React from "react";
import { makeMoveable, ResizableProps, Resizable } from "react-moveable";
// In order to use only some able, make a component with makeMoveable function.
const Moveable = makeMoveable<ResizableProps>([Resizable]);
@daybrush is it available in svelte-moveable package?
@evanshe It will take time, but ultimately it will be a problem that will be solved.
Only react is provided so far, and other frameworks will support it as well.
@daybrush I think there is a way to make the Moveable library bundle 10x smaller by using preact-compat
instead of React. Preact is a much smaller alternative to React which maintains compatibility with React API. Let me know what you think. Thank you.
@osbre
I am using croact
(like preact) which I developed.
I plan to reduce the size by tree shaking the unused able.
Any plans to make vanilla bundle smaller? Currently it's around
70kb min
I think there is a potential to make it
~10kb min