webpack: Add OccurrenceOrderPlugin as Webpack optimizer (#9365)

* Add OccurrenceOrderPlugin

* Add deprectation notice
This commit is contained in:
Evan Sebastian
2016-05-23 12:55:35 +09:00
committed by Horiuchi_H
parent 0710f0ad23
commit da28561597
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -333,6 +333,7 @@ plugin = new webpack.optimize.DedupePlugin();
plugin = new webpack.optimize.LimitChunkCountPlugin(options);
plugin = new webpack.optimize.MinChunkSizePlugin(options);
plugin = new webpack.optimize.OccurenceOrderPlugin(preferEntry);
plugin = new webpack.optimize.OccurrenceOrderPlugin(preferEntry);
plugin = new webpack.optimize.UglifyJsPlugin(options);
plugin = new webpack.optimize.UglifyJsPlugin();
plugin = new webpack.optimize.UglifyJsPlugin({
+2
View File
@@ -327,7 +327,9 @@ declare module "webpack" {
* Assign the module and chunk ids by occurrence count. Ids that are used often get lower (shorter) ids.
* This make ids predictable, reduces to total file size and is recommended.
*/
// TODO: This is a typo, and will be removed in Webpack 2.
OccurenceOrderPlugin: optimize.OccurenceOrderPluginStatic;
OccurrenceOrderPlugin: optimize.OccurenceOrderPluginStatic;
/**
* Minimize all JavaScript output of chunks. Loaders are switched into minimizing mode.
* You can pass an object containing UglifyJs options.