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

dev-server-manifest Fails to Crawl CSS from node_modules #398

Open
lilijh opened this issue Oct 14, 2024 · 0 comments
Open

dev-server-manifest Fails to Crawl CSS from node_modules #398

lilijh opened this issue Oct 14, 2024 · 0 comments

Comments

@lilijh
Copy link

lilijh commented Oct 14, 2024

Description

I created a project based on UnoCSS and then introduced a reset provided by UnoCSS,

//it will set 'list-style:none'
import "@unocss/reset/tailwind.css";

However, I found that this reset doesn’t work on the server side in the dev environment. Through debugging, I discovered that it seems to be caused by this piece of code:

if (nodePath.includes('node_modules')) {
return;
}

Because the styles on the server side and the final styles on the client side are inconsistent, the page flashes.

14.10.2024_17.41.07_REC.mp4

Note: This problem doesn’t exist in the production environment.

Expected Behavior

The styles on the server side should be consistent with those on the client side.

Minimal Reproduce

https://stackblitz.com/edit/vitejs-vite-mmpg4r?file=app%2Fapp.tsx,app.config.ts

@lilijh lilijh changed the title dev-server-manifest don't crawl the css from node_modles casuse something wrong dev-server-manifest doesn't crawl the css from node_modles casuse something wrong Oct 14, 2024
@lilijh lilijh changed the title dev-server-manifest doesn't crawl the css from node_modles casuse something wrong Dev Server Manifest Fails to Crawl CSS from Node Modules Oct 14, 2024
@lilijh lilijh changed the title Dev Server Manifest Fails to Crawl CSS from Node Modules dev-server-manifest Fails to Crawl CSS from Node Modules Oct 14, 2024
@lilijh lilijh changed the title dev-server-manifest Fails to Crawl CSS from Node Modules dev-server-manifest Fails to Crawl CSS from node_modules Oct 14, 2024
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