Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> It's just a module bundler.

It is how Webpack works, actually. Webpack does not support bundling to native ES6 modules [0], it has to bundle into a format which requires runtime code being injected to execute properly, handling imports, and whatnot instead of relying purely on native ES6 modules.

Have you ever looked at the contents of a bundle? [1]

Long story short, Webpack circumvents native ES6 modules in favor of other module formats. It provides a great amount of utility, but it is not Vanilla JS.

[0] https://github.com/webpack/webpack/issues/2933 [1] https://pastebin.com/C2qPunwV



Internet Explorer isn't Vanilla.js either.


Agreed. Internet Explorer was almost certainly not written in JavaScript at all— most likely C++.


I want to give you the benefit of the doubt that you're being sardonic but just in case I meant IE doesn't support ES6 modules so thereby following your narrowly pedantic definition it isn't very vanilla.js


My point was not that you must use ES6 modules— my point was that webpack does NOT use ES6 modules so it must include a framework for importing, exporting, and otherwise consuming the bundles.

Serious questions, please don’t dance around them:

How is what I described above still Vanilla JS?

Would you consider using TypeScript to be Vanilla JS? Why or why not?

Would you consider using lo dash to be Vanilla JS? Why or why not?

Also, Vanilla JS is pedantic. The point is that you don’t need any of these tools to make a website or web app.

I personally like the tools I use, I don’t care about vanilla js. But you can’t just try to argue it’s not obviously meant to not include a bundling or transpiration step.

Furthermore, making a site/app with everything being vanilla js EXCEPT for also using Webpack is certainly as admirable— but it makes it not vanilla js.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: