You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Saving CSS files while LiveSync running uglifies file #31
Is this a file that does not have an associated .sass or .scss file?
The expected behavior is that the .css output generated by this plugin is minified and compressed. But I don't think it should be doing that to plain .css files if there is no matching SASS source.
This may be a little trickier to "solve" than I thought.
I believe what we're seeing is the default behavior of the node-sass library (which underpins this plugin). By default, it is processing all files, and there does not seem to be an easy way to make it "ignore" plain CSS files.
Simplest workaround is to just rename all of your existing .css files to .scss. This will have the effect of preserving your original CSS comments/formatting. Probably the best choice.
Will keep investigating to see if there is another option for ignoring CSS that does not have a related SCSS file.
Activity
toddanglin commentedon May 4, 2017
Is this a file that does not have an associated
.sassor.scssfile?The expected behavior is that the
.cssoutput generated by this plugin is minified and compressed. But I don't think it should be doing that to plain.cssfiles if there is no matching SASS source.lukeramsden commentedon May 4, 2017
There isn't.
Here are my packages for reference:
toddanglin commentedon May 4, 2017
I added this scenario to the demo app for testing (and future regression checks).
I am able to reproduce the behavior you reported: on LiveSync, a plain CSS file is compressed/minified. Let me investigate and deploy a quick patch.
toddanglin commentedon May 4, 2017
This may be a little trickier to "solve" than I thought.
I believe what we're seeing is the default behavior of the
node-sasslibrary (which underpins this plugin). By default, it is processing all files, and there does not seem to be an easy way to make it "ignore" plain CSS files.Simplest workaround is to just rename all of your existing
.cssfiles to.scss. This will have the effect of preserving your original CSS comments/formatting. Probably the best choice.Will keep investigating to see if there is another option for ignoring CSS that does not have a related SCSS file.
lukeramsden commentedon May 4, 2017
Alright, will do