Skip to content

Commit 31f868d

Browse files
committed
fix(build): fixed filtering files during optimization process
1 parent 9b95f00 commit 31f868d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

gulpfile.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ gulp.task('html', ['optimize'], function () {
228228

229229
gulp.task('optimize', ['html:inject'], function () {
230230
var assets = plugins.useref.assets();
231-
var cssFilter = plugins.filter('**/*.css');
232-
var jsFilter = plugins.filter('**/*.js');
231+
var cssFilter = plugins.filter('**/*.css', { restore: true });
232+
var jsFilter = plugins.filter('**/*.js', { restore: true });
233233

234234
return gulp.src(config.build + '/index.html')
235235
.pipe(plugins.plumber())
@@ -240,7 +240,7 @@ gulp.task('optimize', ['html:inject'], function () {
240240
}))
241241
.pipe(plugins.csso())
242242
.pipe(plugins.size({ showFiles: true, title: '[CSS]' }))
243-
.pipe(cssFilter.restore())
243+
.pipe(cssFilter.restore)
244244
.pipe(jsFilter)
245245
.pipe(plugins.ngAnnotate())
246246
.pipe(plugins.uglify({
@@ -250,7 +250,7 @@ gulp.task('optimize', ['html:inject'], function () {
250250
}
251251
}))
252252
.pipe(plugins.size({ showFiles: true, title: '[JS]' }))
253-
.pipe(jsFilter.restore())
253+
.pipe(jsFilter.restore)
254254
.pipe(assets.restore())
255255
.pipe(plugins.useref())
256256
.pipe(plugins.size())

0 commit comments

Comments
 (0)