stylex
stylex copied to clipboard
esbuild plugin
Is your feature request related to a problem? Please describe. I use esbuild to build my web apps, and need stylex to generate the css for me.
Describe a solution you'd like esbuild plugin
Describe alternatives you've considered Reverting to webpack again which I don't want.
The work to create a Vite plugin is underway. We can tackle this after that is done.
The work to create a Vite plugin is underway. We can tackle this after that is done.
Thank you! Will that by any chance include Module support instead of CommonJS?
We have a POC for a Vite plugin that works with Qwik. Qwik relies on SSR in a way that is similar to Next App dir, so Making Qwik would imply that it should work with most Vite apps.
https://github.com/nmn/qwik-stylex
I will be porting this to a few additional Vite frameworks to verify that it works as expected.
@mohamedmansour We will use the cannonical module system for the bundler in question. When in doubt we compile to CJS
because Node let's you import CJS
from ESM
but not vice versa.
I have written the plugin through unplugin to support: rspack, esbuild and vite. The repo is here.
But there is in a primitive stage, and there are still many things to complete.
Any questions DM me, or commit an issue in the repo.
Thanks~
An Esbuild plugin is available as 0.5.0-alpha.2
please see if it works for your use-cases.
Fixed in #319