You typically need to hook into the compiler to support vanilla-extract, but since Remix doesn't support this yet, I wanted to see if I could build a workaround.
This prototype runs a separate build process using tsup (which uses esbuild + TS under the hood) to generate CSS + JS + types into your Remix app directory. There are a few tradeoffs to this approach that I've covered in the readme, but I think this could definitely work for a lot of people, myself included.
Please let me know what you think, and enjoy! 🙏
https://github.com/markdalgleish/remix-vanilla-extract-prototype