SMP follows semver. This guide should help with upgrading major versions.
If you're using the SpeedMeasurePlugin.wrapPlugins(plugins, options) static method, then
.wrapPlugins callssmpsmp.wrap on your entire confige.g.
// v0
const webpackConfig = {
plugins: SpeedMeasurePlugin.wrapPlugins({
FooPlugin: new FooPlugin()
}, smpOptions)
};
// v1
const smp = new SpeedMeasurePlugin(smpOptions);
const webpackConfig = smp.wrap({
plugins: [new FooPlugin()]
});
smp InstanceIf you're using the smp.wrapPlugins(plugins) method, then
.wrapPlugins callssmp.wrap on your entire confige.g.
// v0
const smp = new SpeedMeasurePlugin(smpOptions);
const webpackConfig = {
plugins: smp.wrapPlugins({
FooPlugin: new FooPlugin()
})
};
// v1
const smp = new SpeedMeasurePlugin(smpOptions);
const webpackConfig = smp.wrap({
plugins: [new FooPlugin()]
});
v1 no longer requires you to manually enter each plugin name. If you want to keep any of your custom plugin names, then you can use the new options.pluginNames option:
const fooPlugin = new FooPlugin();
const smp = new SpeedMeasurePlugin({
pluginNames: {
customFooPluginName: fooPlugin
}
});
const webpackConfig = smp.wrap({
plugins: [fooPlugin]
});