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
Fix: CSS files don't build in dev mode on Windows #42041
Conversation
path.resolve( PACKAGES_DIR, packageName, 'src/*.scss' ) | ||
path | ||
.resolve( PACKAGES_DIR, packageName, 'src/*.scss' ) | ||
.replace( /\\/g, '/' ) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I discovered that when I run npm run dev
, createStyleEntryTransform
function is executed and the CSS file stored in this entries
variable is returned to stream.
However, this variable was empty on Windows OS.
As described in the fast-glob v3.0.0 release notes, I think the reason is that only forward slashes are allowed in regular expressions in globs, and slash replacement is no longer processed.
So I added the process of replacing backslashes with forward slashes.
Size Change: 0 B Total Size: 1.25 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for another fix for Windows. The same issue with normalizing paths as usual.
Related issue:
Follow-up on:
What?
This PR resolves a problem in Windows OS where CSS files are not properly monitored and built when
npm run dev
is run.Why? & How?
See this comment.
Testing Instructions
npm run dev
.packages/
directory.(e.g.
packages\components\src\placeholder\style.scss
)build/
directory have been updated according to the SCSS update.(e.g.
build/components/style.css
)