Skip to content

Latest commit

 

History

History
60 lines (39 loc) · 1.07 KB

MIGRATION_GUIDE_v1_to_v2.md

File metadata and controls

60 lines (39 loc) · 1.07 KB

Migration Guide v1.x to v2.x

WebpackStats nolonger includes the render config by default.

plugins: [htmlRenderPlugin.rendererPlugin];

To recreate the previous behaviour pass the stats collector to render config

plugins: [
  htmlRenderPlugin.statsCollectorPlugin,
  htmlRenderPlugin.rendererPlugin,
];

Where builds have two configurations (client and render) this will now mean your stats file will be a standard Stats file and not a MultiStats file.

Remove Support for "Alternative multiple configuration setup"

This method was deprecated in the previous major release and has now been removed.

Example:

new HtmlRenderPlugin().apply(multiCompiler);

Deprecate the calling of render() and passing in the plugin directly

This syntax is still supported until the next major release but the prefered syntax is listed below.

Render

Before:

htmlRenderPlugin.render();

After:

htmlRenderPlugin.rendererPlugin;

Client

Before:

htmlRenderPlugin;

After:

htmlRenderPlugin.statsCollectorPlugin;