Skip to content
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

NextJS appDir: cannot use colors that have not been used yet #125

Open
ngoov opened this issue Jan 8, 2023 · 0 comments
Open

NextJS appDir: cannot use colors that have not been used yet #125

ngoov opened this issue Jan 8, 2023 · 0 comments

Comments

@ngoov
Copy link

ngoov commented Jan 8, 2023

Describe the bug
I'm using the experimental appDir (which is used by a lot of people to test currently) and WindiCSS in my app. Using WindiCSS in the pages dir works perfectly, even the fast refresh. Using it in the app/ dir only works for colors that have been already used anywhere in the code (so I guess exists in the "windi.css"). Even hard reloading using CTRL+F5 on the page does not work. Only restarting the dev server works to use the colors that have been defined in the page when starting the server.
I guess something is wrong with the cache.

To Reproduce
I've created a simple CodeSandbox to reproduce this issue:
https://codesandbox.io/p/sandbox/crazy-ioana-3iu9rp?file=%2Fapp%2Fpage.tsx
When you change the color of the div on the app/page.tsx file to for example bg-blue-100, the color is not found. Same when you try to use bg-red-500 for example or any color that has not been used in the app yet.

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
I've tried multiple versions of nextjs, like 13.0.4, 13.1.1 or the canary versions of 13.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant