From a922331d3631475f29fb8a985096d6806ab8bf3d Mon Sep 17 00:00:00 2001 From: Stephen Niedzielski Date: Fri, 5 Oct 2018 11:31:05 -0600 Subject: [PATCH] Hygiene: remove unused Webpack plugins Remove the LoaderOptionsPlugin and DefinePlugin from the Webpack configuration. These plugins *do not* alter production or development build products or appear to impact Redux interaction. Bug: T212527 Change-Id: I4ca2bde2346011167f86f7f4a331048a2e92263b --- webpack.config.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 7ebe6fd85..9c260f00c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -114,22 +114,4 @@ const conf = { } }; -// Production settings. -// Define the global process.env.NODE_ENV so that libraries like redux and -// redux-thunk get development code trimmed. -// Enable minimize flags for webpack loaders and disable debug. -if ( isProduction ) { - conf.plugins = conf.plugins.concat( [ - new webpack.LoaderOptionsPlugin( { - minimize: true, - debug: false - } ), - new webpack.DefinePlugin( { - 'process.env': { - NODE_ENV: JSON.stringify( 'production' ) - } - } ) - ] ); -} - module.exports = conf;