postcss / postcss-mixins

PostCSS plugin for mixins
MIT License
466 stars 47 forks source link

Enable hot reloading of the functional mixins #146

Closed andgra closed 2 years ago

andgra commented 2 years ago

Hello,

In additional to the #145 I added try ... catch around require of mixin file. In case there is a syntax of any other error in a single mixin file, other mixins will be loaded successfully. Should I write tests for this case?

ai commented 2 years ago

No, we do not need tests for errors

ai commented 2 years ago

I fixed CI. Do you plan to send another PR or we are ready for release?

andgra commented 2 years ago

Actually, there is an issue with windows OS. While mixinsDir option is sanitized for the glob package (replace \ with /), mixinsFiles are not. So paths like mixinsFiles: join(__dirname, 'deps', 'f.js') will always fail on windows. There is an easy way to fix this, but I didn't include it in current PR because its a different issue

Should I create separate PR for this?

andgra commented 2 years ago

P.S. also there is an issue with .CSS files on windows when we use mixinsDir (file extension in upper case), but its very rare case and I dont know how to easily fix it. But if your file extensions always in lower case, there is no issue at all.

ai commented 2 years ago

Thanks for the great research on Windows compatibility. I will wait for PRs.

andgra commented 2 years ago

Created #147

andgra commented 2 years ago

Thank you, that's all what I wanted to improve

ai commented 2 years ago

Thanks. Released in 9.0.3.