How can i combine multiple JavaScript files into one and make it inline script. Currently I can combine into one file using gulp usemin but i can't do it as inline script . I want to solve render blocking request issue. My question is following is it possible to do it?
This is a part of code
<!-- build:js scripts/plugins.js -->
<!-- endbuild -->
gulp.task('usemin', gulp.series('inject', 'less', function(callback) {
return gulp.src('./app/index.html')
.pipe(usemin({
// js: [ngAnnotate,uglify]
}))
.pipe(gulp.dest(currentDir))
.on('end', function () {
del('./app/index.html');
});
}));
You could potentially use the async or defer attributes on your script instead: