dai-shi / waku

⛩️ The minimal React framework
https://waku.gg
MIT License
4.08k stars 108 forks source link

chore: switch `vite-plugin-stylex` to `vite-plugin-stylex-dev` #361

Closed nonzzz closed 5 months ago

nonzzz commented 5 months ago

Background

vite-plugin-stylex-dev has more features than vite-plugin-stylex, and then vite-plugin-stylex-dev can convert most of scense. Such as path alias and etc. And it can work well with vite’s internal css plugin. So i think using vite-plugin-stylex-dev is better.

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
waku ✅ Ready (Inspect) Visit Preview Jan 12, 2024 11:56pm
codesandbox-ci[bot] commented 5 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 5b7b4dfcd17cc891de2f19b85ef6c6d1a3518203:

Sandbox Source
Vanilla Typescript Configuration
React Configuration
React TypeScript Configuration
dai-shi commented 5 months ago

@himself65

himself65 commented 5 months ago

yeah, this guy has messaged me privately. I will check if it indeed better like say so. For now I have no particular preference for this PR since examples are just show cases, does not have better or worse

dai-shi commented 5 months ago

are these packages developed by different authors?

nonzzz commented 5 months ago

are these packages developed by different authors?

yes,I'm one of them, They are not official plugins, but their development concepts are different, I think it's very troublesome to adapt each framework or library, So i made vite-plugin-stylex-dev to solve it.As the stylex team said, the official version won't be provided until the community is stable.

dai-shi commented 5 months ago

There will be vite-plugin-stylex-dev2 in the future. I think unless vite-plugin-stylex is really broken, we don't need to switch, and wait for the official version. Though, it might be interesting, if the new one provides a meaningful capability for Waku's show case. I'll leave it to @himself65 .

himself65 commented 5 months ago

We have one reason to use this plugin; this plugin supports the latest stylex with the ESM module that won't break Vite

https://github.com/facebook/stylex/pull/328

himself65 commented 5 months ago

BTW, I want to have a way to include as many plugin into our CI as possible so we can see the ecosystem compatibility

dai-shi commented 5 months ago

a way to include as many plugin into our CI

You mean without explicitly adding them in examples? Would be great.

dai-shi commented 5 months ago

As I tried, this behaves better. Previously, the style isn't applied on the initial load (dev-only). So, I think we should merge this.

@nonzzz Would you please resolve conflicts?

nonzzz commented 5 months ago

@dai-shi I will resolve them :)

nonzzz commented 5 months ago

Resolve done.