3 ms·
Right, I agree it’s much nicer to write JavaScript now than ever before. Merely pointing out that it’s not meant to be a compiled language. As a community we co
by awhitty 4y ago
Right, I agree it’s much nicer to write JavaScript now than ever before. Merely pointing out that it’s not meant to be a compiled language. As a community we continue to expect a build step to exist when it really doesn’t have to for a broad class of projects. Transpilers were never the end-goal.
It’s true that there are some optimizations done in the build step that benefit end users, and folks will probably (correctly) continue to choose to minify, tree shake, bundle + bundle split, eliminate dead code, etc. for serious applications.
But to be able to write a modern web app without having to npm install a single module would be stellar! And it’s becoming more and more possible. How do you teach someone how to write a JS project in 2022? I imagine it starts with, “Well, first you’ll need to install node and npm - that’s gonna run JavaScript on your computer but don’t mind that much for now. Now we’ll install some dependencies required to build your code…” and so on. It takes a while and many conceptual hurdles to get to the part where someone can run the code they wrote in a browser.