dai-shi / waku

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

feat: add `@stylexjs/stylex` example #286

Closed himself65 closed 6 months ago

vercel[bot] commented 6 months ago

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

Name Status Preview Updated (UTC)
waku ✅ Ready (Inspect) Visit Preview Dec 21, 2023 0:13am
codesandbox-ci[bot] commented 6 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 8182488f197f516d19bf4362e643ff16c4007e86:

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

stylex doesn't support esm module

So, is it essentially the same as #110?

himself65 commented 6 months ago

stylex doesn't support esm module

So, is it essentially the same as #110?

CJS not supported is the vite issue. They suggest using vite-plugin-commonjs. However, doesn't work in waku dev mode.

HorusGoul commented 6 months ago

The plugin mostly works (https://github.com/HorusGoul/waku-stylex-demo), but I encountered an issue that prevented me from installing a Waku demo on the mono repo of the plugin to add tests to it.

I believe it has to do with having multiple react versions in the same mono repo, for some reason, Waku is trying to pick the one from the top-level node_modules, see this PR: https://github.com/HorusGoul/vite-plugin-stylex/pull/22

himself65 commented 6 months ago

I believe it has to do with having multiple react versions in the same mono repo, for some reason, Waku is trying to pick the one from the top-level node_modules, see this PR: https://github.com/HorusGoul/vite-plugin-stylex/pull/22

/cc @dai-shi any idea? I think this is package manager behavior

dai-shi commented 6 months ago

I'm not quite following. So, is it like this PR is working for @himself65 without dual package issue, but @HorusGoul has the dual package issue?

dai-shi commented 6 months ago

Ok, I investigated a while and I believe is plugin stylex bug with SSR

What does it mean? It feels like this example has a limitation, or no?

himself65 commented 6 months ago

Ok, I investigated a while and I believe is plugin stylex bug with SSR

What does it mean? It feels like this example has a limitation, or no?

Just we have to add @stylex stylesheet; in one CSS stylesheet to make things work. Not a limitation

himself65 commented 6 months ago

I'm not quite following. So, is it like this PR is working for @himself65 without dual package issue, but @HorusGoul has the dual package issue?

No. dual package issue happens on his repo. Not waku