Skip to content
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

css min isn't updated if compiled css is empty or null #157

Closed
mattheiler opened this issue Nov 24, 2015 · 0 comments
Closed

css min isn't updated if compiled css is empty or null #157

mattheiler opened this issue Nov 24, 2015 · 0 comments

Comments

@mattheiler
Copy link

Look at /src/WebCompiler/Minify/FileMinifier.cs, line 82:

80            string result = minifier.MinifyStyleSheet(content, settings);
81
82            if (!string.IsNullOrEmpty(result))

If the CSS compiler result is empty, the CSS min file isn't written.
The result of compiling the following SASS is an empty\null string...

.main > .main-body {
  // .style-me { }
}

This could also an be issue with JS, but is prevented by "use strict", which is added by the compiler, always forcing the JS min file to be written.

Consider either cleaning the original file, if it exists, or always minifying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant