From 14f1b91302208efdf6f27565eb887ed32ada9e21 Mon Sep 17 00:00:00 2001 From: Joseph Wynn Date: Sun, 12 Jun 2016 22:33:13 +0100 Subject: [PATCH] Run derequire as part of the build. This is a workaround for the browserify issue reported in ##20, since https://github.com/substack/node-browserify/pull/1151 seems to be dead in the water. --- gulpfile.babel.js | 2 ++ package.json | 1 + 2 files changed, 3 insertions(+) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 915992f..a10bb6d 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -2,6 +2,7 @@ import gulp from 'gulp' import gutil from 'gulp-util' import standard from 'gulp-standard' import browserify from 'browserify' +import derequire from 'gulp-derequire' import rename from 'gulp-rename' import uglify from 'gulp-uglify' import sourcemaps from 'gulp-sourcemaps' @@ -26,6 +27,7 @@ gulp.task('js', () => { .pipe(buffer()) .pipe(sourcemaps.init({ loadMaps: true })) .pipe(sourcemaps.write('.')) + .pipe(derequire()) .pipe(gulp.dest('dist')) }) diff --git a/package.json b/package.json index 9324038..0fafd02 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "browserify": "^13.0.1", "eslint-plugin-react": "^5.1.1", "gulp": "^3.9.1", + "gulp-derequire": "^2.1.0", "gulp-rename": "^1.2.2", "gulp-sourcemaps": "^1.6.0", "gulp-standard": "^7.0.1",