Closed magnusottosson closed 6 years ago
Hello, Magnus!
You are using a code from the “Control Minification per Request with Web Optimizations” article?
Hello, Magnus!
I decided not to wait for your answer and explain the essence of problem. Regarding @imports
(as well as other types of file dependencies): currently the Microsoft ASP.NET Web Optimization Framework do not gives us opportunities to directly manage the cache dependencies of bundle, and therefore we can only add @imports
to the Files
property of BundleResponse
class.
In most cases, this specificity of implementation will not cause any problems. I couldn't even reproduce the error, that you described. Most likely, in your web application there are some non-standard add-ins. Four years ago I was faced with a similar add-in.
You could make a demonstration project, which reproduce this error.
Hello, Magnus!
Since I did not receive feedback from you, then I close this issue.
Hi,
I have a file (styles.scss) that imported other files like:
@import "Static/scss/base/_variables.scss";
In debug mode with optimizations turned off this works:
BundleTable.EnableOptimizations = true;
But if I run the code not in debug mode with optimizations turned off it seems like all the imported scss files are added in the html like:
This gives 500 errors since these files are not in the bundle. The correct implementation here would be that the is process as an scss file. Everything seems to be working except that the imported scss files should not be written to the html since they are not a part of the bundle...
This error only happens when running the code not in debug mode with enable optimisations turned off.