From 003cbbc9b746e85bfe5020ec59210f5733e03d6e Mon Sep 17 00:00:00 2001 From: Kareem Francis Date: Thu, 24 Sep 2015 21:30:20 -0400 Subject: [PATCH] Update gulpfile.js - prevent possible TypeError Prevent `TypeError: Cannot read property 'concat' of undefined` if no plugins are specified in webpack.config.js --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index b2cbe02..0a0583b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -21,7 +21,7 @@ gulp.task("build", ["webpack:build"]); gulp.task("webpack:build", function(callback) { // modify some webpack config options var myConfig = Object.create(webpackConfig); - myConfig.plugins = myConfig.plugins.concat( + myConfig.plugins = (myConfig.plugins || []).concat( new webpack.DefinePlugin({ "process.env": { // This has effect on the react lib size