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
This commit is contained in:
Stephen Niedzielski 2018-10-05 11:31:05 -06:00 committed by Niedzielski
parent 81a2f4acb0
commit a922331d36

View file

@ -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;