postcss / postcss-cli

CLI for postcss
Other
824 stars 93 forks source link

Second save to a css file from Visual Studio 2019/2022 does not trigger a recompile #389

Closed syska closed 2 years ago

syska commented 2 years ago

I have this repo: https://github.com/syska/postcss-test

OS: Windows 10 VS Code version: 1.59 Visual Studio 2019: 16.11.0 Visual Studio 2022: Preview 3

When running: npm run build:css:dev and editing the css file in VS Code, it triggers a file change every time ...

When doing the same thing from Visual Studio 2019/2022 it only does this the first time ...

When doing a fsutil file queryfileid .\Styles\test.css I can see the FileID changes when being saved from Visual Studio.

When it stops working in Visual Studio, it still works in VS Code.

Is this an issue with the way Visual Studio saves the file since it changes the FileID?

Putting the "--poll" to the command fixes it from Visual Studio ... but this seems like a workaround ... but might be the only way.

RyanZim commented 2 years ago

Yeah, use --poll as a workaround for now. We use https://github.com/paulmillr/chokidar for file watching, so any issues would need to be fixed there.