You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.5 KiB
1.5 KiB
Migration Guide
SMP follows semver. This guide should help with upgrading major versions.
v0 → v1
If Using Static Constructor
If you're using the SpeedMeasurePlugin.wrapPlugins(plugins, options) static method, then
- remove all
.wrapPluginscalls - instantiate an
smp - call
smp.wrapon your entire config
e.g.
// v0
const webpackConfig = {
plugins: SpeedMeasurePlugin.wrapPlugins({
FooPlugin: new FooPlugin()
}, smpOptions)
};
// v1
const smp = new SpeedMeasurePlugin(smpOptions);
const webpackConfig = smp.wrap({
plugins: [new FooPlugin()]
});
If Using smp Instance
If you're using the smp.wrapPlugins(plugins) method, then
- remove all
.wrapPluginscalls - call
smp.wrapon your entire config
e.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()]
});
If Using Custom Names
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]
});