If you’re looking to integrate vanilla-extract with Remix, this prototype offers an interesting approach despite some notable tradeoffs. The Remix team has expressed interest in providing official support for vanilla-extract in the future, but until then, this solution presents a viable interim method for developers wanting to enhance their styling capabilities while working with these tools.
The process entails specific setup steps, including installing dependencies and running development servers. However, it requires a careful consideration of how styles are managed and compiled, especially when it comes to the unique architecture that vanilla-extract brings to the table.
.css.ts files must be manually re-exported from a central index file, creating a style manifest that must be maintained throughout development./styles, regardless of the directory structure, to ensure styles are correctly processed.index.css file located in /app/styles, which your application’s root route must include.