Comment by elfelf12
1 year ago
What do you use for frontend tooling then? Somehow you have to compile scss and do some mild js bundling or so?
1 year ago
What do you use for frontend tooling then? Somehow you have to compile scss and do some mild js bundling or so?
It comes batteries included so in theory I don't even have to think about it. I'm using the happy path of just making use of the included tailwind css setup where I know it'll work out of the box.
Rail embraced #NOBUILD starting Rails 7.
No pipelines, no minification, no nonsense, just serving js and css directly.
Hey.com works like this, and they reported nothing but improvement.
Is it still possible to include minification, tree-shaking and bundling to propshaft or have they fully excluded these options?
BTW I wouldn't consider those to be "free" features. #NOBUILD allows assets to live much much longer in cache. with minification + whatevah, everytime you change something in a js file you invalidate the whole bundle, which means the client will have to fetch megabytes of javascript, potentially very frequently. So you need to see for your self whether the savings from minification outweigh the savings of caching.
Bundling is also something that we no longer need to do since the introduction of HTTP2. I would even consider it an anti-pattern these days, since it means you're sending the client much more data than they actually need.
Tree shaking is definitely very important for something like tailwind though.
Still possible, propshaft works perfectly with the official js-bundling and css-bundling gems which let you add any js build pipeline as a build step
1 reply →