News for hackers. Stuff that matters.
Re:Why we switched from Webpack to Vite by jeswin on Thursday April 29, 2021 @12:25AM (#26977460)
This is excellent advice. There's something I really dislike about import "./style.css" into JS files - it just seems meaningless especially if you've worked with other languages/ecosystems. A great many tutorials default to this style, so it'll likely live on for a while.

As yet another tiny UI framework creator (forgojs.org), the switch to esbuild-loader was our best developer experience decision. create-forgo-app (our CRA equivalent) takes 3-4 seconds, and running it is instantaneous. Faster builds actually change the way developers write code.

Re:Why we switched from Webpack to Vite by viklove on Thursday April 29, 2021 @01:00AM (#26977639)
One great problem it solves is namespacing all of your styles. I don't have to worry about classname collisions because the bundle handles it all for me. Instead of having one massive global stylesheet, I have a bunch of small, modular stylesheets that fit entirely on my display without scrolling, and I can reason about the output much easier than before.
Re:Why we switched from Webpack to Vite by panzerklein on Thursday April 29, 2021 @11:55AM (#26982790)
You're talking about css modules. It's a different feature.
Re:Why we switched from Webpack to Vite by eliseumds on Thursday April 29, 2021 @09:53AM (#26981173)
Plus effortless code splitting.