Minfy CSS and Javascript that includes @import url (ASP.Net)

1k Views Asked by At

I have about 20 CSS files loading on my page, and I am looking for a tool to minify my CSS and JavaScript. I really like SquishIt, but it doesn't seem to handle css that is loaded via @import url. Since quite a few of my CSS files are loaded via @import, the output is not correct.

Is there a fix for this, or can someone recommended another tool that properly handles CSS imported via @import?

2

There are 2 best solutions below

0
On
0
On

Did you try calling the .ProcessImports method on css bundle setup? I think it does what you want, see test case CanRenderCssFileWithImportStatement() in this file