-
Notifications
You must be signed in to change notification settings - Fork 644
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
[Dark Theme] Fix failing functional tests related to minification #9935
[Dark Theme] Fix failing functional tests related to minification #9935
Conversation
@@ -118,8 +118,6 @@ private static void BundlingPostStart() | |||
// Add scripts bundles | |||
var newStyleBundle = new StyleBundle("~/Content/gallery/css/site.min.css"); | |||
newStyleBundle | |||
.Include("~/Content/gallery/css/bootstrap.css") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing these files from the sites min since we already have the minified files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider leaving a comment about why boostrap is not included here
e85c08c
to
1b17d73
Compare
b97e8e4
to
c750fa9
Compare
1b17d73
to
3ce9603
Compare
@martinrrm |
3f6c458
to
ddd10df
Compare
3ce9603
to
1dba8a0
Compare
ddd10df
to
6cbc94d
Compare
9012138
to
133a070
Compare
@joelverhagen @agr Finally fixed tests https://dev.azure.com/nuget/NuGetBuild/_build/results?buildId=100646&view=results. Code has changed a little bit but it's the same solution. When bundling bootstrap.css to This solution is to add We only need to reference it in one file like we are doing with |
Which tool are you referring here? |
@erdembayar So I've looked in the documentation and found that is using this package https://learn.microsoft.com/en-us/previous-versions/aspnet/hh195125(v=vs.110) which I believe it's been outdated since 2013. There is some documentation on how to minify other type of files (less, scss and sass which are other preprocessors) here https://learn.microsoft.com/en-us/aspnet/mvc/overview/performance/bundling-and-minification#less-coffeescript-scss-sass-bundling, they recommend installing another package and parsing the file with it. Which technically is what I'm doing here but with grunt. |
Functional tests related to minification started to fail with this new feature.
What is happening is that CSS minification isn't able to understand the CSS variables because we are using an old package to handle bundle/minification (System.Web.Optimization from 2014).
Fix
Grunt also creates minified files every time we use
grunt
command, with this change I'm no longer adding the files to thesite.min.css
bundle to avoid minification and instead use the minified file we already have.Addresses #9936