Skip to content

Commit d5e18f1

Browse files
committed
fix(gulp): fix gulp build images
Fix the path to the rev manifest for gulp-rev-replace. Also refactor to use the same path for the rev manifest.
1 parent 80d2036 commit d5e18f1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: templates/app/gulpfile.babel(gulp).js

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const paths = {
3333
client: {
3434
assets: `${clientPath}/assets/**/*`,
3535
images: `${clientPath}/assets/images/**/*`,
36+
revManifest: `${clientPath}/assets/rev-manifest.json`,
3637
scripts: [
3738
`${clientPath}/**/!(*.spec|*.mock).<%= scriptExt %>`,
3839
`!${clientPath}/bower_components/**/*`<% if(filters.ts) { %>,
@@ -564,7 +565,7 @@ gulp.task('build:images', () => {
564565
}))
565566
.pipe(plugins.rev())
566567
.pipe(gulp.dest(`${paths.dist}/${clientPath}/assets/images`))
567-
.pipe(plugins.rev.manifest(`${paths.dist}/${clientPath}/assets/rev-manifest.json`, {
568+
.pipe(plugins.rev.manifest(`${paths.dist}/${paths.client.revManifest}`, {
568569
base: `${paths.dist}/${clientPath}/assets`,
569570
merge: true
570571
}))
@@ -573,7 +574,7 @@ gulp.task('build:images', () => {
573574

574575
gulp.task('revReplaceWebpack', function() {
575576
return gulp.src('dist/client/app.*.js')
576-
.pipe(plugins.revReplace({manifest: gulp.src(paths.client.assets.revManifest)}))
577+
.pipe(plugins.revReplace({manifest: gulp.src(`${paths.dist}/${paths.client.revManifest}`)}))
577578
.pipe(gulp.dest('dist/client'));
578579
});
579580

0 commit comments

Comments
 (0)