diff --git a/gulpfile.js b/gulpfile.js index 581ebe42..61e13398 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -18,7 +18,7 @@ const argv = require('yargs') const paths = { manifest: './public/assets', - assets: './public/assets/{css,scripts}/*.{css,css.map,js,js.map}', + assets: './public/assets/{css,scripts}/*.{css,js,map}', styles: { src: './resources/assets/styles/main.css', dest: './public/assets/css', @@ -30,11 +30,6 @@ const paths = { }, }; -const clearSourcemaps = through.obj(function (file, enc, cb) { - if (!/\.map$/.test(file.path)) this.push(file); - cb(); -}); - /** * Build un-compiled CSS into a minified version. */ @@ -63,7 +58,10 @@ function styles() { function scripts() { return webpackStream(webpackConfig) .pipe(sourcemaps.init({loadMaps: true})) - .pipe(clearSourcemaps) + .pipe(through.obj(function (file, enc, cb) { // Remove Souremaps + if (!/\.map$/.test(file.path)) this.push(file); + cb(); + })) .pipe(babel()) .pipe(gulpif(argv.production, uglify())) .pipe(concat('bundle.js'))