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
cachebust.references() fails to match paths that starts with a folder name beginning with a period.
var gulp = require("gulp"),
concat = require("gulp-concat"),
inject = require("gulp-inject"),
uglify = require("gulp-uglify"),
CacheBuster = require("gulp-cachebust");
var cachebust = new CacheBuster();
gulp.task("min:js", function () {
return gulp.src([
"./app/*.js",
"./app/**/*.js"
])
.pipe(concat("./.build/js/bundled.min.js"))
.pipe(uglify())
.pipe(gulp.dest(".")) // writes out the original file for injection
.pipe(cachebust.resources())
.pipe(gulp.dest(".")); // writes the busted file
});
gulp.task("inject:index", function () {
return gulp.src('./templates/index.html' })
.pipe(inject(gulp.src('./.build/js/bundled.min.js', { read: false })))
.pipe(cachebust.references())
.pipe(gulp.dest('./.build/templates'));
});
After running tasks min:js followed by inject:js, the file written to /.build/templates/index.html contains the original file path instead of the expected busted file path. The busted file is generated.
Changing the /.build folder name to one that does not start with a period (ex: /build) works around the problem.
The text was updated successfully, but these errors were encountered:
cachebust.references() fails to match paths that starts with a folder name beginning with a period.
After running tasks min:js followed by inject:js, the file written to /.build/templates/index.html contains the original file path instead of the expected busted file path. The busted file is generated.
Changing the /.build folder name to one that does not start with a period (ex: /build) works around the problem.
The text was updated successfully, but these errors were encountered: