For people not in the web dev space, web bundlers are a useful tool that helps manage the front end assets. They handle the compiling, dependency resolution, minification, cache busting, and any other transformation you want to do with your code. It's already possible to use Nim with a web bundler, just compile the Nim code and point the bundler towards the compiled file. But I do enough web development that is was worth it to me to write a plugin to make the process zero friction. This is a plugin for my preferred bundler, Parcel: https://github.com/nepeckman/parcel-plugin-nim. Cool things that this plugin does:- Compiles all my front end in one step, instead of 2
- Watches the dependencies of my Nim front end entry point, re-compiles and auto updates the browser on change
- I get to write <script src="main.nim"></script> which I think is cool
This isn't anything super groundbreaking, but its useful to me and hopefully its useful for someone else as well.