theron-wang / VS2022-Editor-Support-for-Tailwind-CSS

Unofficial VS2022 Tailwind CSS extension for IntelliSense, linting, sorting, and more to enhance the development experience in Visual Studio 2022.
https://marketplace.visualstudio.com/items?itemName=TheronWang.TailwindCSSIntellisense
MIT License
86 stars 5 forks source link

OutputCssFile becomes null if file is missing. #11

Closed Siphonophora closed 1 year ago

Siphonophora commented 1 year ago

Hi, i'm running into an issue with the extension, if the output file is not present at build start. When the file is not there, then the extension is changing output css file to null, when it starts the build.

I would expect it should not clear the output file config, and instead just rebuild that file.

If it helps, this is the file I am starting with. {"ConfigurationFile":"tailwind.config.js","InputCssFile":"Styles\\site_src.css","OutputCssFile":"wwwroot\\css\\site.css"}

theron-wang commented 1 year ago

I just released an update which addresses the issue. Hopefully, everything works as expected now.

Thanks!

Siphonophora commented 1 year ago

@theron-wang On 1.1.7.3 I think this is only partly fixed. If the output file isn't present, the config no longer gets nulled. However, it seems to still be falling back on the default output file instead of the configured one, when it builds.

theron-wang commented 1 year ago

Sorry for the incomplete fix! I'll look into it and release a fix.

theron-wang commented 1 year ago

I found that when you directly modify the tailwind.extension.json file, the build process fails to pick up on the changes -- I added an event listener so it correctly updates when that file is saved.

Again, sorry for the oversight in the previous fix, and I hope this works well.