loading...

Discussion on: Why SvelteJS may be the best framework for new web devs

antony profile image
Antony Jones

You can do this too, but the proper way is to use svelte.preprocess.

The reason I don't import directly into components (other than sass variables) is because Svelte strips unused classes, and your imported CSS is going to have a lot of bloat which will need to be stripped, which will result in long build times.

Thread Thread
steelvoltage profile image
Brian Barbour

That makes a lot of sense. Thanks! I plan on giving Svelte another go here soon.

Thread Thread
jumanja profile image
jumanja

Hi Brian, Ben, et all reading this. For those trying to put Svelte and Bulma together in a project, by coincidence I recently was trying to do the same thing, I think I solved and inside Svelte components it recognizes Bulma. Would be great if I can get oppinnions from you guys, as I was thinking to post some article on next days or make a full example maybe connecting it to a REST api, but now reading this great posts and yor comments, maybe I should investigate about svelte.preprocess first to give it a try.

Anyway, here you have the github link: github.com/jumanja/SvelteBulma

Cheers,

Juan
jumanja.net

Thread Thread
steelvoltage profile image
Brian Barbour

Ah I liked how you did that!

Importing it in your css file. Pretty clever. That makes it easier, reminds me of how it's done in Next.js too.

Thread Thread
mebble profile image
Neil Syiemlieh

This is exactly what I needed @jumanja . Thank you!