Giter Club home page Giter Club logo

Comments (9)

cayter avatar cayter commented on August 22, 2024 1

@nkev Since you're from golang realm, I'd suggest you to quickly set this up to get a feeling of how SvelteJS bundle size looks like in a real-world application. Here's quick start you can get to experience: https://appist.gitbook.io/appy/getting-started.

Disclaimer: I built this web framework by putting together few of the best packages from golang community and made SvelteJS as the primary choice for building the PWA with it. This is how the development with go + webpack-dev-server looks like. https://asciinema.org/a/312186

I thought maybe only the 432K JS file would be the storybook bundle and one of the other two JS files (inside the iframe) could be sveltestrap

Don't guess, use the tool to analyse it, here you go: https://github.com/webpack-contrib/webpack-bundle-analyzer. If a web app is bundled with webpack and you see a filename with vendors in it, it is very likely everything from node_modules are bundled together into it. Hence, the huge bundle size that scared you off.

from sveltestrap.

bestguy avatar bestguy commented on August 22, 2024

Mind sharing a repo or sample? Webpack, Rollup, etc?
Svelte is designed to compile away any frameworks down to vanilla JS.
However Svelte 3 is a big change and app developers or this lib might be missing something.

from sveltestrap.

nkev avatar nkev commented on August 22, 2024

Sure. I'm just talking about the size of the JS payload in the browser:

image

versus:

image

from sveltestrap.

bestguy avatar bestguy commented on August 22, 2024

I see, if you are comparing the Storybook docs, that is a different beast! - I think storybookjs is internally using React and other libraries, not Svelte. (The stories are written in Svelte though)

Here is a Hello World app using Sapper and Sveltestrap:

Screen Shot 2019-10-28 at 8 09 41 PM

You can see this is much smaller (14kb!)

from sveltestrap.

bestguy avatar bestguy commented on August 22, 2024

Try out the Svelte quick start (https://svelte.dev/blog/the-easiest-way-to-get-started) or Sapper for more power. Both should demonstrate small code sizes.

Will close but feel free to reopen if you see a size issue with this lib.

from sveltestrap.

nkev avatar nkev commented on August 22, 2024

I see. Thanks for that. So to be clear, in my Sveltestrap screenshot above, which JS files are from the Sveltestrap project? If it's just the 2 in the IFRAME than that's still over 300K compared to 45K in Bootstrap right? I'm just trying to get a comparative feel.

from sveltestrap.

nkev avatar nkev commented on August 22, 2024

Thanks for the Sapper tip BTW. I'm using Go in the back-end though so I'm really only evaluating Svelte and whether I can really drop jQuery and go with Sveltestrap (but only if it's leaner).

from sveltestrap.

gthomas-appfolio avatar gthomas-appfolio commented on August 22, 2024

@nkev it's really hard to separate them as storybook bundles everything together, and the svelte part is just via a plugin. You should not be looking at Sveltestrap storybook to determine Svelte bundle sizes - it's a React, not a Svelte app.

from sveltestrap.

nkev avatar nkev commented on August 22, 2024

Thanks @gthomas-appfolio, I understand that. I thought maybe only the 432K JS file would be the storybook bundle and one of the other two JS files (inside the iframe) could be sveltestrap, but without looking into the JS files I could be wrong, of course. Are there any other known sveltestrap public sites that I could check out?

from sveltestrap.

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.