Fix for manifest not updating on initial build
parent
0a46dc16a6
commit
545e545f51
14
gulpfile.js
14
gulpfile.js
|
@ -272,8 +272,12 @@ var defaultStatsOptions = {
|
|||
errorDetails: false
|
||||
};
|
||||
|
||||
var webpackCalled = false;
|
||||
gulp.task('pack-watch', function(cb) {
|
||||
var called = false;
|
||||
if (webpackCalled) {
|
||||
console.log('webpack watching already runnning');
|
||||
return cb();
|
||||
}
|
||||
gulp.src(webpackConfig.entry)
|
||||
.pipe(plumber({ errorHandler: errorHandler }))
|
||||
.pipe(webpack(Object.assign(
|
||||
|
@ -286,9 +290,9 @@ gulp.task('pack-watch', function(cb) {
|
|||
gutil.log(stats.toString(defaultStatsOptions));
|
||||
}
|
||||
|
||||
if (!called) {
|
||||
debug('webpack watch completed');
|
||||
called = true;
|
||||
if (!webpackCalled) {
|
||||
debug('webpack init completed');
|
||||
webpackCalled = true;
|
||||
cb();
|
||||
}
|
||||
|
||||
|
@ -296,7 +300,7 @@ gulp.task('pack-watch', function(cb) {
|
|||
.pipe(gulp.dest(webpackConfig.output.path));
|
||||
});
|
||||
|
||||
gulp.task('pack-watch-manifest', function() {
|
||||
gulp.task('pack-watch-manifest', ['pack-watch'], function() {
|
||||
var manifestName = 'react-manifest.json';
|
||||
var dest = webpackConfig.output.path;
|
||||
return gulp.src(dest + '/bundle.js')
|
||||
|
|
Loading…
Reference in New Issue