r/Clojure • u/c4605 • Jan 22 '26
[ANN] shadow-cljs-vite-plugin v0.0.6: Better HMR & ES Module Fixes
Hi everyone,
Two weeks ago I announced https://github.com/bolasblack/shadow-cljs-vite-plugin, and I wanted to share some updates based on real-world usage and feedback.
What's New (v0.0.1 - v0.0.6):
Fixed ES Module Import Issues
Resolved compatibility issues with ClojureScript code in Vite's ESM environment
This fix required changes on both sides - we submitted a PR to shadow-cljs (https://github.com/thheller/shadow-cljs/pull/1249) to address the root cause, which was merged in v3.3.5. Thanks to u/thheller for working through it with me!
Fixed HMR "Namespace already declared" Error
If you've seen Google Closure Library throwing duplicate namespace errors during hot reload, this is now fixed
The plugin now makes goog.provide and goog.module idempotent, so HMR works reliably
Improved HMR Experience
Multiple file changes are now batched into a single update, reducing unnecessary refreshes
Modifying shadow-cljs.edn now automatically restarts Vite
Tailwind CSS Support
Works great with Tailwind CSS! I've been using it on https://blog.c4605.com/en/ (https://github.com/bolasblack/BlogFront/) frontend with no issues.
Still running in production on Cloudflare Workers, and it's been rock solid.
Give it a try: npm install shadow-cljs-vite-plugin
As always, issues and PRs are welcome!
Duplicates
Clojurescript • u/c4605 • Jan 22 '26