Live data from Hacker News

Vite – Next Generation Front End Tooling

main.vitejs.dev

371–380 of 383 posts

Re: Vite – Next Generation Front End Tooling

#371

I'm a happy vite user, but it troubles me when I think about how complicated everything it abstracts has become. It uses rollup for some things, esbuild for others, workbox for my service worker... I switched from webpack to it, and while my config is certainly less complex, I at least could tell you what webpack is doing. Vite is magic. Can I just use esbuild yet?

I am under the impression that vite uses esbuild and roll up?

Re: Vite – Next Generation Front End Tooling

#372
post #46

It gave me a pause to think about how it came that I can never really tell what am I looking at anymore. Forget the HN title, which is stupid — what does this landing page tell me? Well, that it's… next gen, and it apparently can catch up with me, which is not much, since I'm not really catching up with what's going on anyway. Also, that it's "tooling". Like IDE, or framework, or maybe a chainsaw. Can't tell. "Gettin…

We switched to vite not for what it is but because what it isn't.

We get react and scss compilation/bundling with 4 lines of config (it basically just says "react()").

production builds take under a minute. npm install takes 6 seconds tops. it starts dev mode in a second with hot reloading enabled.

you can tell me how awesome its tech is under the hood for hours, but i dont care. it STAYS OUT OF THE WAY and thats wha i want.

just as it should.

Re: Vite – Next Generation Front End Tooling

#373

Earlier quoted context omitted.

It’s more like Webpack, the software that processes your React code into JavaScript bundles that are optimized for the browser. ie puts together what belongs together, removes the unused code, provides a test server to develop and get instant refresh.

How would one use it together with a backend that already serves the frontend code? As a compiler only?

If you're talking about something like Django where you would want to serve frontend JS from a static assets directory, you would have to output a build bundle into your static directory. You would not get hot reloading that way, though.

Re: Vite – Next Generation Front End Tooling

#374

Earlier quoted context omitted.

It’s more like Webpack, the software that processes your React code into JavaScript bundles that are optimized for the browser. ie puts together what belongs together, removes the unused code, provides a test server to develop and get instant refresh.

How would one use it together with a backend that already serves the frontend code? As a compiler only?

You could yes, however you’ll probably have to write your configuration from scratch. You’ll have to define the JavaScript entry files (those that call the others) and put that into your HTMLs. Depending on how many scripts etc you have this might be a lot of work, but this should optimize your JavaScript to ist what you need.

Re: Vite – Next Generation Front End Tooling

#375
post #280

Earlier quoted context omitted.

Apparently you have never built a webapp that is more ambituous than a simple website. The superpower of "modern" frameworks (Vue and React are both 5-10 years old) is abstracting away from the DOM to be able to define your view as a function of state. Vanilla JS doesn't help you in that regard.

See reply to woojoo below - not saying I'm the world's best frontend dev, but I've built complex apps with many screens / modes / complex state. Despite what people seem to think, the world doesn't fall apart without a virtual DOM, indeed it usually gets simpler. Vanilla JS gives you all the essentials to make abstractions to fit your task (i.e. functions and structured data).

Sure it's possible. You can also program in assembly instead of Java. But you'll soon be creating your own abstraction layer, why not use one that is very thin too and battle tested by millions of users?

Re: Vite – Next Generation Front End Tooling

#376

Earlier quoted context omitted.

Javascript UI frameworks last longer the Microsoft UI frameworks. It's not like a newer framework is just replacing an old one because of hype. React/Vue are massive improvements over Angular 1.

To be completely fair, changes occur way too often even when the name doesn't change. I tried to find a nice component library for starting out with Vue after not doing any frontend or JavaScript in years (I kind of quit when JSPM, the package manager, was hot). It took me about an hour to figure out nothing I tried to set up worked because I had installed Vue 3 and mostly everything else was still on Vue 2. Reminds…

if you want out of the box Vue 3 component framework, try https://quasar.dev/

Re: Vite – Next Generation Front End Tooling

#377
post #59

Working with front end for 5+ years have nearly made me switch careers. There's an absolute onslaught of languages, frameworks, patterns and now also "tools" that never really work in you editor, and you never really grasp before moving on to the next thing. I think me and my team have spent 90% of our time working with tooling, and all creativity and joy has gone out the window - because you never become a master, a…

Since Angular CLI I've probably not thought about tooling in about 6 years now. It just works, it gets better and it essentially upgrades itself

Re: Vite – Next Generation Front End Tooling

#378

Earlier quoted context omitted.

Javascript UI frameworks last longer the Microsoft UI frameworks. It's not like a newer framework is just replacing an old one because of hype. React/Vue are massive improvements over Angular 1.

To be completely fair, changes occur way too often even when the name doesn't change. I tried to find a nice component library for starting out with Vue after not doing any frontend or JavaScript in years (I kind of quit when JSPM, the package manager, was hot). It took me about an hour to figure out nothing I tried to set up worked because I had installed Vue 3 and mostly everything else was still on Vue 2. Reminds…

Vue3 looks like react to me in a not good kind of way. I'm moving on to svelte.

Re: Vite – Next Generation Front End Tooling

#379

Earlier quoted context omitted.

This gets repeated in every thread about front-end tech, and every time people have to repeat the same explanation. SSR is not PHP. SSR allows you to run the same code on client and server. You get to use client-side frameworks, but the page is rendered before it even reaches the client. If people could try to understand SSR before diminishing it, we could have much more productive discussions. But as of now the freq…

> but the page is rendered before it even reaches the client Which is what PHP was built for. > If people could try to understand SSR before diminishing it, we could have much more productive discussions. If new generation of frontend people could try to understand PHP before diminishing it, we could have much more productive discussions.

You can't just crop out half the sentence and make an equivalency. The full sentence was

> You get to use client-side frameworks, but the page is rendered before it even reaches the client

Does PHP run in the client? No? Then it's not the same as SSR. You have it completely backwards. I understand PHP but you clearly don't understand SSR

Re: Vite – Next Generation Front End Tooling

#380
post #46

It gave me a pause to think about how it came that I can never really tell what am I looking at anymore. Forget the HN title, which is stupid — what does this landing page tell me? Well, that it's… next gen, and it apparently can catch up with me, which is not much, since I'm not really catching up with what's going on anyway. Also, that it's "tooling". Like IDE, or framework, or maybe a chainsaw. Can't tell. "Gettin…

Terrible landing page indeed, when their "Why" page [1] has most of the answers new users would be looking for.

[1]: https://main.vitejs.dev/guide/why.html

Post reply on HN