You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case where I need to transform my source code defining CSS styles before Macaron catches them.
My project is relying on Vite, so naturally I created a Vite plugin to do that transformation using the transform hook, which can modify the content of a module on the fly. I also made sure this hook would get called before Macaron does its processing.
Unfortunately, as I mentioned at the beginning of my comment in a discussion in the vanilla-extract-css repository, Macaron completely circumvents the Vite modules transformation pipeline and reads the files directly on disk, making my solution impossible to implement in a clean way.
Would it be possible to improve the babel side and accept the content instead, and the Vite side to pass in that content then, which that way can be transformed upstream by others?
The text was updated successfully, but these errors were encountered:
I have a use case where I need to transform my source code defining CSS styles before Macaron catches them.
My project is relying on Vite, so naturally I created a Vite plugin to do that transformation using the
transform
hook, which can modify the content of a module on the fly. I also made sure this hook would get called before Macaron does its processing.Unfortunately, as I mentioned at the beginning of my comment in a discussion in the
vanilla-extract-css
repository, Macaron completely circumvents the Vite modules transformation pipeline and reads the files directly on disk, making my solution impossible to implement in a clean way.Digging a bit, I understand that the Vite plugin is just a wrapper around a Babel based solution, and that the latter only accepts a file path as input, and not the content directly.
Would it be possible to improve the babel side and accept the content instead, and the Vite side to pass in that content then, which that way can be transformed upstream by others?
The text was updated successfully, but these errors were encountered: