Git Product home page Git Product logo

Comments (5)

SimoTod avatar SimoTod commented on June 7, 2024

#52
It could it the same bug reported here. There will be a fix soon, I'll message you to test it when ready.

from alpine-magic-helpers.

SimoTod avatar SimoTod commented on June 7, 2024

@OGhawsi Wnen you have time, could you try <script src="https://cdn.jsdelivr.net/gh/SimoTod/alpine-magic-helpers@bug/scroll-float-values/dist/index.min.js"></script> and let me know if it fixes your bug?
If everything is okay, we'll tag a patch release soon. Thanks

from alpine-magic-helpers.

SimoTod avatar SimoTod commented on June 7, 2024

We released it so your error may be fixed already. Let us know.

from alpine-magic-helpers.

OGhawsi avatar OGhawsi commented on June 7, 2024

Thanks, @SimoTod for your quick fix and response. It is working fine now.
and I have noticed that the size of my js file increased to 417 KiB from 200 Kib after installing alpine-magic-helpers, and with npm run prod, the js file size is 50 KiB and without this package, it is only 26 KiB. And AlpineJS is known for its small size, so it would be nice if the size of the compiled package is reduced.
Thanks.

from alpine-magic-helpers.

SimoTod avatar SimoTod commented on June 7, 2024

HI @OGhawsi. thanks for confirming that.

This library adds a bunch of features to enhance the Alpine experience. That comes with a cost, additional KB.
As you pointed out, in production and with proper minification is currently ~24KB because there is some additional code to support multiple browsers.

This is unlikely to diminish and it will go up while we add new features but we will try to keep it as small as possible.
If you see a point where you can optimize it further, feel free to send a PR and we'll review and get it merged.

Bear in mind that 24KB is roughly the weight of a low-quality image and about half the size of the sprite that Google uses in its search engine (https://ssl.gstatic.com/gb/images/p1_799229b0.png). Over the network, when using gzip is about 8KB so I wouldn't define it as "huge".

If you are compiling your bundle and you don't use certain features, you can strip them from your build since all the helpers are exported separately (see https://github.com/alpine-collective/alpine-magic-helpers/blob/master/src/index.js#L9).
Fetch alone for example is 13KB so if you don't use it, you'll save more than half the weight.

I hope it helps.

from alpine-magic-helpers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.