While I’m a front-end developer at heart, I’ve rarely had the luxury of focusing on it full time. I’ve been dipping in and out of JavaScript, never fully caught up, always trying to navigate the ecosystem all over again each time a project came up. And framework fatigue is real!
So, instead of finally getting into Rollup to replace an ancient Browserify build on one of our codebases (which could also really use that upgrade from Polymer to LitElement…), I decided to go “stackless”.
Elise Hein
I’m certainly not dogmatic about it, but I think if you can pull of a project with literally zero build process. It feels good while working on it and feels very good when you come back to it months/years later: you just pick up and go.
Imports, yo — they go a long way:
Native support for modularity is the most important step towards a build-free codebase. If I had access to only one ES6 feature for the rest of my life, I’m confident that modules would take me most of the way there when it comes to well-structured native JavaScript.
That last sentence in the post is a stinger. I’d say we’re not far off.
I’d suggest actually trying Svelte in this case (svelte.dev). It lets you code without a big learning curve, and at the very least you can think of it like the binding on a notebook. It’s better than a bunch of loose sheets of paper everywhere.
It helps to structure your code in the IDE, providing great typescript tooling among other things. In my opinion this is a faster and lighter weight way to write code compared with only vanilla (which wouldn’t have treeshaking, etc)
Sounds great… if all you need to worry about is modern browsers.
I still have to support IE11. Yep. The pain is real!
And I still prefer using Sass.
So I must use a bundler. Hmmm.
I’ve found Parcel really good for zero config setup. Just requires some NPM scripts, and ensuring that Browserslist, Babel, PostCSS, etc, give me the desired output.
Far easier than Webpack or Gulp.