Live data from Hacker News

Why we switched from Webpack to Vite

blog.replit.com

151–160 of 229 posts

Re: Why we switched from Webpack to Vite

#151
post #26

Earlier quoted context omitted.

I see you have never worked on a C/C++ project.

Yeah this appears to be more or less the essential complexity of build+link

Looks like you may be shadow banned - I vouched for this comment and see all your recent previous comments are dead

Re: Why we switched from Webpack to Vite

#152
post #126
post #84

Earlier quoted context omitted.

Most of the build tooling gets installed along the way. The compiled JS is hundreds of bytes at most, usually because React creates a bunch of boilerplate for you (a basic CSS file, an application, a web worker, etc) which you may remove.

But why would you? This is the silliest way to judge something ever: what practical web application is anyone routinely building with no CSS, web workers etc.

You would because you're comparing it to a "Hello world" command-line program in another language which also doesn't have CSS, web workers, etc.

Re: Why we switched from Webpack to Vite

#153
post #76

Webdev truly is one of a kind. Not only do you have your source code, you also have your build code, oddly dictating the organization of your source code. For extra fun, some libraries don't build with build system a, others require build system b, when you're lucky enough to have a working mix, changing build systems is better to be avoided. Of course periodically the officially blessed build system for your used li…

For personal projects I just use plain javaScript, ES5 even, without any compile steps, everything loads instantly and runs on every browser that supports JavaScript, and the development can be set up in any environment/OS without headaches. I do use minification for production but that is not really necessary if the browser supports loading JS-script tags async (all major browsers). The bundle gets very small withou…

I really love TypeScript. But I have always considered the end game of TypeScript to be that it’s inference engine (and third party libraries) become so good that you can just can write ECMAScript and get all the benefits of typescript.

I wouldn’t give up all my structural type inference for the 1:1 you’re describing, but it is tempting.

Re: Why we switched from Webpack to Vite

#155
post #50

Earlier quoted context omitted.

You enable sourcemaps on Webpack with `devtool = "eval-source-map"` in your config, and I'm not sure how you expect transpiling to be a problem with testing considering your tests are also transpiled.

Do you compile and run your unit tests with webpack?

In the case of code that needs to be transpiled, like Typescript, yes.

Re: Why we switched from Webpack to Vite

#156

Earlier quoted context omitted.

Is it? I know there's no sizeof, but what would be sizeof(char) in JS? 1 byte?

The answer to this question is complicated. JavaScript char encoding is roughly UTF-16, which is 2-bytes, but the byte you read may have been part of a surrogate so, depending on your first one, you must read the next 2 bytes to complete your character. And of course, this basic explanation doesn’t really do justice to answering your question, because depending on your definition of what a “character” is, you may nee…

No need to overcomplicate though. None of this applies to the ascii range, and we're just talking about storage in disk in the first place.

Re: Why we switched from Webpack to Vite

#157
post #96

Earlier quoted context omitted.

>Super excited about the future of JavaScript tooling ecosystem with more focus on efficiency and speed. Well they can't get worse than now... 234mb for a friggin hello world app

It’s more of a hello import the world.

Or is it the other way around!

Re: Why we switched from Webpack to Vite

#158
post #121

In the Ember.js ecosystem there's a really exciting new build tool project called "mho", that replaces webpack and uses a novel strategy running in a service worker to interpret native javascript modules with minimal overhead & near instant rebuilds (disclaimer I'm not familiar with how snowpack works under the hood). https://github.com/ef4/mho https://www.youtube.com/watch?v=09USvAy7w9g https://sqwok.im/p/TleLmpJ9BF…

I used to not get Ember but of all the frameworks its users love it the most. I remember when Ember was the "cool" framework almost ten years ago. The community has evolved it and kept it relevant which is truly impressive. Ember entered the world at a time Backbone.js was cutting edge. Ember is still relevant and has adopted modern best practices, moved to TypeScript, and most importantly provided an easy upgrade path.

Most companies burn money on a total re-write when old tech gets too hard to support. Ember has never accepted this. I love that!

Re: Why we switched from Webpack to Vite

#159
post #119
post #26

Earlier quoted context omitted.

I see you have never worked on a C/C++ project.

I have done both. C++ is miles better in comparison.

Maybe you can enlighten me how to easily add a dependency (the equivalent of "yarn add lodash") in a platform-independent way.

Re: Why we switched from Webpack to Vite

#160
post #47

Earlier quoted context omitted.

> The webdev ecosystem is so broken Allow me to correct this statement: The Javascript ecosystem is so broken. Working with Clojurescript and Elm is an experience that will make most developers fall in love with web development again.

Hate to break it to you but Clojurescript, Elm and the whole paradigm of "compile to JS" languages are part of what is broken about the javascript ecosystem. So much unnecessary complexity and energy wasted making javascript pretend to be something it isn't and to make it do things it was never meant to do, pressing a small, simple and powerful scripting language into the service of the profane eldritch abomination t…

Hate to break it to you, but what you call "Enterprise Development" is really just "large software projects", for which many find the "simple and powerful scripting language" inadequate.
Post reply on HN