-
-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: [DEV only] waku app with vanilla-extract #953
Comments
Is #750 somehow related? |
My issue also work well when using client component. |
It could be upstream issue. Btw, What is |
I think you've asked it before, but anyway, it's a way to bridge our two vite servers for delegating hot reloads. |
I'm investigating to resolve this issue, but I'm gonna take some time 😅 -import { container } from "../components/styles.css"
+import { container } from "../components/styles.css.js" When I did like this, It has no error but there are no styles at all(including tailwindcss). It means no css is being injected to html on dev mode. |
@dai-shi I think the root cause of issue is the configFile: false attribute. We are passing it because we resolve the vite config by calling the resolveConfig function, which causes unexpeceted issues. If I am not wrong we don't need to call it as it is internally called by the createViteServer anyways. Since we pass configFile as false, the vanillaExtract plugin honours that attribute and passes waku vite server's inlineConfig to it's own viteServer instance, which causes all of the waku specific plugins to run. And in the rscHmrPlugin where we create html, the vite server instance gets changed, which ultimately fails the generation of css. I have added the possible solution here, please have a look. |
Thanks for looking into it. |
if that's true, we can remove the mergeConfig! but that need to be verified so we do not lose the support of vite configs. |
That's a very unexpected usage of the attribute, but can't blame. Let's hope #1036 works. |
Background
I was migrating waku app into
[email protected]
withvanilla-extract
. I encountered this error:How to reproduce
This is reproduction of this issue.
https://github.com/ojj1123/repro-waku-vanilla-extract
http://localhost:3000/
Additional Contexts
pnpm dev
). I tried to dopnpm build
andpnpm start
, but there were no issues.__vanilla_globalCssAdapter__
you can see is used@vanilla-extract/vite-plugin
internally. Bug I don't know what it is. 😅The text was updated successfully, but these errors were encountered: