Closed santosguilherme closed 8 years ago
Please post a sample gulpfile or a link to a repo where sample (or actual) code can be inspected. Thanks.
The link on StackOverflow has examples, but here is the part of build task:
...
.pipe($.filter('**/*.css', { restore: true }))
.pipe($.sourcemaps.init())
.pipe($.minifyCss({ processImport: false }))
.pipe(bless())
.pipe($.sourcemaps.write('maps'))
.pipe(cssFilter.restore)
.pipe(assets.restore())
.pipe($.useref())
.pipe($.revReplace())
...
Part of useref tags on index.html:
...
<!-- build:css(src) css/vendor.css -->
<!-- bower:css -->
<!-- endbower -->
<!-- endbuild -->
<!-- build:css(src) css/app.css -->
<!-- inject:css -->
<!-- endinject -->
<!-- endbuild -->
...
Solved by removing the sourceMap.
I would use the gulp-bless plugin to separate bower CSS files, because the generated minified file is too long and isn't processed completely in IE 9.
But the file generated by gulp-bless plugin isn't replaced in the "index.html" file by gulp-useref plugin.
The gulp useref plugin also can't join all files, would keep the structure generated by the gulp-bless plugin.
Someone has any idea?
More details: http://stackoverflow.com/questions/37005513/how-to-user-gulp-bless-with-gulp-useref