@@ -268,57 +268,11 @@ WebpackOptionsApply.prototype.process = function(options, compiler) {
268268
269269 compiler . apply ( new WarnCaseSensitiveModulesPlugin ( ) ) ;
270270
271- if ( options . optimize && options . optimize . occurenceOrder ) {
272- compiler . apply ( new MovedToPluginWarningPlugin ( "optimize.occurenceOrder" , "optimize.OccurrenceOrderPlugin" ) ) ;
273- var OccurrenceOrderPlugin = require ( "./optimize/OccurrenceOrderPlugin" ) ;
274- compiler . apply ( new OccurrenceOrderPlugin ( options . optimize . occurenceOrderPreferEntry ) ) ;
275- }
276-
277- if ( options . optimize && options . optimize . minChunkSize ) {
278- compiler . apply ( new MovedToPluginWarningPlugin ( "optimize.minChunkSize" , "optimize.MinChunkSizePlugin" ) ) ;
279- var MinChunkSizePlugin = require ( "./optimize/MinChunkSizePlugin" ) ;
280- compiler . apply ( new MinChunkSizePlugin ( options . optimize ) ) ;
281- }
282-
283- if ( options . optimize && options . optimize . maxChunks ) {
284- compiler . apply ( new MovedToPluginWarningPlugin ( "optimize.maxChunks" , "optimize.LimitChunkCountPlugin" ) ) ;
285- var LimitChunkCountPlugin = require ( "./optimize/LimitChunkCountPlugin" ) ;
286- compiler . apply ( new LimitChunkCountPlugin ( options . optimize ) ) ;
287- }
288-
289- if ( options . optimize . minimize ) {
290- compiler . apply ( new MovedToPluginWarningPlugin ( "optimize.minimize" , "optimize.UglifyJsPlugin" ) ) ;
291- var UglifyJsPlugin = require ( "./optimize/UglifyJsPlugin" ) ;
292- if ( options . optimize . minimize === true )
293- compiler . apply ( new UglifyJsPlugin ( ) ) ;
294- else
295- compiler . apply ( new UglifyJsPlugin ( options . optimize . minimize ) ) ;
296- }
297-
298271 if ( options . cache === undefined ? options . watch : options . cache ) {
299272 var CachePlugin = require ( "./CachePlugin" ) ;
300273 compiler . apply ( new CachePlugin ( typeof options . cache === "object" ? options . cache : null ) ) ;
301274 }
302275
303- if ( typeof options . provide === "object" ) {
304- compiler . apply ( new MovedToPluginWarningPlugin ( "provide" , "ProvidePlugin" ) ) ;
305- var ProvidePlugin = require ( "./ProvidePlugin" ) ;
306- compiler . apply ( new ProvidePlugin ( options . provide ) ) ;
307- }
308-
309- if ( options . define ) {
310- compiler . apply ( new MovedToPluginWarningPlugin ( "define" , "DefinePlugin" ) ) ;
311- var defineObject = { } ;
312- if ( typeof options . define === "object" ) {
313- Object . keys ( options . define ) . forEach ( function ( key ) {
314- defineObject [ key ] = options . define [ key ] ;
315- } ) ;
316- }
317- compiler . apply ( new DefinePlugin ( defineObject ) ) ;
318- }
319- if ( options . defineDebug !== false )
320- compiler . apply ( new DefinePlugin ( { DEBUG : ! ! options . debug } ) ) ;
321-
322276 compiler . applyPlugins ( "after-plugins" , compiler ) ;
323277 compiler . resolvers . normal . apply (
324278 new UnsafeCachePlugin ( options . resolve . unsafeCache ) ,
0 commit comments