Towards the Metal

2021/08/20

Transpiling and bundling have pushed the JavaScript ecosystem forward. I was an early advocate of using webpack in Rails (see github.com/danott/webpack_rails). This toolchain has been a net positive in cultivating the JavaScript I want to see in the world. And author in my editor.

But tonight, I ripped the toolchain out of an app. I traded in webpacker for importmap-rails. After resolving one bug along the way, my app is now serving up ES modules, with no need for a compiling step. It feels good to be back in the app/assets/javascripts/ neighborhood. Heck, vendor/assets/javascripts/ might make a return for all I know!

The beauty of this is the lack of ceremony. It’s modern JavaScript, for modern browsers. It’s what you see is what you get, as in File > View Source. HTML, CSS, and JS are very good. It strikes my sensibilities to be authoring close to the metal, targeting browser technologies.