Comments (9)
@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.
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.
Sure. I'm just talking about the size of the JS payload in the browser:
versus:
from sveltestrap.
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:
You can see this is much smaller (14kb!)
from sveltestrap.
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.
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.
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.
@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.
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)
- error svelte
- Type issue
- When I install sveltestrap I start getting an error HOT 2
- Svelte 4 support HOT 24
- Build with Node 18+ HOT 3
- Support `keyboard` option of Offcanvas
- ESM/CJS conflict when importing Sveltestrap components HOT 4
- Migrate to floating UI
- Add `"type": "module"` to `package.json` HOT 2
- Button dropdown work only on second press HOT 1
- [docs] "Misleading" Alert title in the first example
- `hidden` flag/attribute on Nav/NavItem
- Documentation on color handling is incorrect HOT 1
- Mixing FormGroup and InputGroup
- Modal on:opening and on:open events are not firing HOT 1
- Looking for new maintainer HOT 4
- Add `plainText` and `size` props for Input
- Allow markup in Input labels
- Important: Repo Migration! HOT 1
- Input date with max attribute keyboard issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sveltestrap.