问题
I'm using yeoman/grunt to for my build process and I'm running into an issue. I'm trying to build two .css files, one for IE8 and one for everything else. If I place the IE conditional on the outside of the build block, an error is thrown because of the comment within a comment. If I put the IE conditional on the inside it gets stripped out.
<!--[if lte IE 8]>
<!-- build:css({.tmp,app}) styles/main-old-ie.css -->
<link rel="stylesheet" href="styles/main-old-ie.css">
<!-- endbuild -->
<![endif]-->
<!--[if gt IE 8]><!-->
<!-- build:css({.tmp,app}) styles/main.css -->
<link rel="stylesheet" href="styles/main.css">
<!-- endbuild -->
<!--<![endif]-->
Is there another/better/easier way of doing this?
Thanks!
回答1:
Upgrade to v2.0. For that functionality.
来源:https://stackoverflow.com/questions/19863385/html-comments-causing-an-issue-exporting-css-files-with-grunt-usemin