Comments (4)
it suggests having a rollup.config.js
It's not needed for SvelteKit, just the changes that you'd make in svelte.config.js
Does svelte take care of not including unused modules behind the scenes using Rollup's default settings (since there is no explicit config setup)?
I'd love to give you full peace of mind, but we haven't actually done full-blown bundle tests. What I do know, however, is that the library mostly contains svelte
and scss
files, all of which are to be fed into the compiler and there really is no point in shipping those over the wire. Personally, I trust the compiler to be smart enough not to include anything it doesn't need.
Also, Attractions is marked as tree-shakeable, if that makes you feel any more confident :) However, if you really need to make a case on tree-shakeability of Attractions (to your coworkers, for example), I'd suggest you to spin up a quick little Svelte project, import one component, check the weight of the build directory, add another import and check again. That's the most reliable way to be sure that you're not shipping anything excess
from attractions.
Hi! Yeah :0
We haven't been at the project for a while, which is why the installation instructions talk about Sapper. The library is compatible with SvelteKit though (it's just Svelte components, after all), and the sveltekit:prefetch
attributes are set along with sapper:prefetch
. As for examples of how to set it up correctly — not much, the same steps apply as for Sapper, since most of the setup stuff is regarding Svelte preprocessors, which are SvelteKit-compatible.
Reach out if you encounter any issues during setup!
from attractions.
Thanks for that!
Re: setup - an under Rollup, it suggests having a rollup.config.js - the starting SvelteKit sample app doesn't have that file. Should this be added?
I'd like to give this component library a try but I want to make sure that unused components aren't included in the production build. I see that when I install the attractions package all components are installed under node_modules/attraction.s
Does svelte take care of not including unused modules behind the scenes using Rollup's default settings (since there is no explicit config setup)?
The final bundle size is important for us so I need to be certain that it stays at a minimum.
Thanks!
from attractions.
Makes sense - thank you. Measuring bundle size before after was on my todo list, was hoping for a straight answer instead of this though. It's an awesome library, but with limited support / unknown future it's hard to win the case of adopting it for prod. Especially that the team is new to Svelte, we don't want to deal with more unknowns :-)
Thanks for your quick turnaround!
from attractions.
Related Issues (20)
- Font is missing HOT 7
- How to use custom fonts for e.g. FormFields? HOT 4
- Add Advanced Documentation for the AccordionSection Element HOT 2
- :global() isn't processed in SvelteKit, some styles aren't applied HOT 7
- Up and running HOT 3
- chip-group.scss has an invalid selector :global HOT 3
- Custom table header / table items content? HOT 3
- kebab case for custom elements HOT 5
- Install can't trace down stylesheets HOT 6
- Is illright.me down? (Attractions main documentation source) HOT 2
- CSS media breakpoints support? HOT 1
- svelte-preprocess 5 is available HOT 3
- There are links to broken doc site pages HOT 1
- Input value disappears on drag&drop HOT 8
- Vite HOT 6
- Docs HOT 1
- DatePicker shows different month than the selected on specific dates HOT 3
- Button Ripple performance HOT 1
- Slider produces errors on mobile devices HOT 1
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 attractions.