facebook / stylex

StyleX is the styling system for ambitious user interfaces.
https://stylexjs.com
MIT License
8.41k stars 310 forks source link

Rspack plugin support #172

Open blueagler opened 11 months ago

blueagler commented 11 months ago

Can we have an RSPack plugin?

nmn commented 11 months ago

Happy to accept contributions for this. It might be possible to use unplugin to do this.

necolas commented 11 months ago

It's also fine for plugins to be developed by 3rd parties in other repos. We can't maintain plugins for every build system out there

iowxy commented 11 months ago

Happy to accept contributions for this. It might be possible to use unplugin to do this.

This is what I want to say

eryue0220 commented 11 months ago

Can I have a try for this?

eryue0220 commented 10 months ago

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. And I think I will need to extra days to solve the unit test and the ci at least.

Any questions please DM me, or commit an issue in the repo.

Thanks~

GiancarlosIO commented 2 months ago

Hi there! I would like to help on this. Is there a guide on how to use unplugin to create the plugin?

nmn commented 2 months ago

@GiancarlosIO

https://unplugin.unjs.io

See the Rollup plugin and the community Vite plugins for further help.

RavenColEvol commented 1 month ago

@nmn will it be okay to use typescript instead of flow for new package contribution? as flow has a learning curve and flow types for new packages like unplugin or rspack is not available.

nmn commented 1 month ago

@RavenColEvol I'm not against using TS for bundler plugins. You can also contribute TS code and I can do the work of migrating it to Flow if it turns out that having a single type system for the whole repo is helpful.

RavenColEvol commented 1 month ago

@nmn I later found out that unplugin community implementation exists and it's mentioned in the docs, so idk if it makes sense to create a unplugin stylex plugin in the stylex repo.

RavenColEvol commented 1 month ago

https://stylexjs.com/docs/learn/ecosystem/#unplugin

nmn commented 1 month ago

Yes, it makes most sense to contribute to that existing plugin and make it better or start another plugin yourself. Over time, we might make some community plugins official, but we don't want to take on additional maintenance burden at the moment and get out of the way of the community.