You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a situation where I'd like to remove just the build block; that is, remove the link tag loading a CSS file, but allow the CSS file itself to be part of the final build.
What about a new type to add to the existing "js", "css" and "remove" types called "remove-block" that would carry this out?
The situation comes up when loading CSS that's not critical to rendering the above the fold content. The non-critical styles are loaded later by inserting a link tag on the document load event:
<!-- Defer loading 'css/styles.css' which contains styles that aren't
critical to rendering above the fold content.
-->
<!-- build:remove-block -->
<link href="css/style.css" rel="stylesheet">
<!-- endbuild -->
<script inline src="js/defer-css.js"></script>
I'm using gulp-inline-source to inline the JavaScript.
If not, is this something I could set up myself with a custom block?
Edit: I should have mentioned that I want the link tag there in the first place (even though I'm going to remove it) so I can load the unprocessed files in a browser and have everything there.
The text was updated successfully, but these errors were encountered:
First off, thanks for useref.
I have a situation where I'd like to remove just the build block; that is, remove the link tag loading a CSS file, but allow the CSS file itself to be part of the final build.
What about a new type to add to the existing "js", "css" and "remove" types called "remove-block" that would carry this out?
The situation comes up when loading CSS that's not critical to rendering the above the fold content. The non-critical styles are loaded later by inserting a link tag on the document load event:
I'm using gulp-inline-source to inline the JavaScript.
If not, is this something I could set up myself with a custom block?
Edit: I should have mentioned that I want the link tag there in the first place (even though I'm going to remove it) so I can load the unprocessed files in a browser and have everything there.
The text was updated successfully, but these errors were encountered: