News for hackers. Stuff that matters.
Re:Vite – Next Generation Front End Tooling by unsupp0rted on Sunday July 03, 2022 @01:36PM (#31969414)
> pretty fast hot reload

An understatement to be sure: you can set VS Code to auto-save every 1 second and that way whatever you type instantly appears via Vite's Hot Reload in your dev browser. No waiting multiple seconds for a recompile.

It's game-changing workflow (for some tasks).

Re:Vite – Next Generation Front End Tooling by boredtofears on Sunday July 03, 2022 @02:09PM (#31969707)
I dunno if it's just me, but I've always found live reload to be an overstated benefit. I usually have a mental model of what I'm trying to code that I don't want to check until it's at a specific state - the seconds it takes to press reload doesn't really add up to that much.

I'd say it's more beneficial for CSS styling but I usually mock up my changes in the dev inspector and then copy it over anyways.

Re:Vite – Next Generation Front End Tooling by aidos on Sunday July 03, 2022 @02:24PM (#31969826)
Exactly that though. For a SPA you’re going to have a bunch of state loaded and you don’t want to refresh. If you’re using something like tailwind where you’re transpiling your css too then it’s a major boon to have it hot reloaded.

I’ve found vite to be an awesome dev experience.

Re:Vite – Next Generation Front End Tooling by drschwabe on Sunday July 03, 2022 @09:55PM (#31972729)
Not just you.

Hotreload can be handy to some extent, annoying in others - I like to preserve state of given app including what the dom looks like + the window/memory state in devtools. Iterate in code, refresh, then compare. You can do that with multiple browser tabs for example. But not with hotreloading; each tab will re-render/reload the global window state.

Re:Vite – Next Generation Front End Tooling by intrasight on Sunday July 03, 2022 @02:04PM (#31969668)
Game-changer perhaps in a bad way ;) We're losing the art of writing solid code and instead flail with the "hot reload" crutch. I miss the days of punching cards and submitting a deck to be compiled and run - at least in terms of it forcing me to verify my work ahead of time.

And yes - I'm (mostly) kidding. But I did write my first programs on punched cards at a university course while I was still in grade school. Probably the last generation of programmers to experience that discipline.

Re:Vite – Next Generation Front End Tooling by nightski on Sunday July 03, 2022 @02:49PM (#31970006)
We are also writing far more complicated software. Punch cards didn’t have to support thousands of different devices, resolutions, screen densities, input methods, etc. It’s a totally different world.
Re:Vite – Next Generation Front End Tooling by crdrost on Sunday July 03, 2022 @03:38PM (#31970357)
That's totally fair but the tooling is still not where you'd like it.

In theory, there's no reason that you shouldn't be able to backtrace from the website to the filesystem. If you can do that, then your "it reloads every second" becomes even faster, it becomes WYSIWYG, you are writing in the live constantly-refreshing UI. Well, almost: your text editor has Undo and Git and your web browser doesn't. But we could build those into the browser. Heck, Redux is basically Git except without any standardized verbs, just give Redux some standardized verbs for tracking revisions in a living app and you've got everything you need.

If you follow that trend to its logical conclusion ("OK I want a special way to ctrl-click or right-click or something to edit the HTML of a component I see") you eventually get Smalltalk, and we're finally back as productive as we could be in the 70s :)

Re:Vite – Next Generation Front End Tooling by jjeaff on Sunday July 03, 2022 @04:56PM (#31970966)
I think it does this by not even recompiling. It just links all the uncompiled, uncompressed files and dependencies using a few functions to make them work in the browser.