SMP follows \href{https://semver.org/}{\texttt{ semver}}. This guide should help with upgrading major versions.\hypertarget{md_sfcode_node_modules_speed_measure_webpack_plugin_migration_autotoc_md28642}{}\doxysection{v0 → v1}\label{md_sfcode_node_modules_speed_measure_webpack_plugin_migration_autotoc_md28642}
\hypertarget{md_sfcode_node_modules_speed_measure_webpack_plugin_migration_autotoc_md28643}{}\doxysubsection{If Using Static Constructor}\label{md_sfcode_node_modules_speed_measure_webpack_plugin_migration_autotoc_md28643}
If you\textquotesingle{}re using the {\ttfamily Speed\+Measure\+Plugin.\+wrap\+Plugins(plugins, options)} static method, then


\begin{DoxyItemize}
\item remove all {\ttfamily .wrap\+Plugins} calls
\item instantiate an {\ttfamily smp}
\item call {\ttfamily smp.\+wrap} on your entire config
\end{DoxyItemize}

e.\+g.


\begin{DoxyCode}{0}
\DoxyCodeLine{// v0}
\DoxyCodeLine{const webpackConfig = \{}
\DoxyCodeLine{  plugins: SpeedMeasurePlugin.wrapPlugins(\{}
\DoxyCodeLine{    FooPlugin: new FooPlugin()}
\DoxyCodeLine{  \}, smpOptions)}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{// v1}
\DoxyCodeLine{const smp = new SpeedMeasurePlugin(smpOptions);}
\DoxyCodeLine{const webpackConfig = smp.wrap(\{}
\DoxyCodeLine{  plugins: [new FooPlugin()]}
\DoxyCodeLine{\}); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_speed_measure_webpack_plugin_migration_autotoc_md28644}{}\doxysubsection{If Using $<$tt$>$smp$<$/tt$>$ Instance}\label{md_sfcode_node_modules_speed_measure_webpack_plugin_migration_autotoc_md28644}
If you\textquotesingle{}re using the {\ttfamily smp.\+wrap\+Plugins(plugins)} method, then


\begin{DoxyItemize}
\item remove all {\ttfamily .wrap\+Plugins} calls
\item call {\ttfamily smp.\+wrap} on your entire config
\end{DoxyItemize}

e.\+g.


\begin{DoxyCode}{0}
\DoxyCodeLine{// v0}
\DoxyCodeLine{const smp = new SpeedMeasurePlugin(smpOptions);}
\DoxyCodeLine{const webpackConfig = \{}
\DoxyCodeLine{  plugins: smp.wrapPlugins(\{}
\DoxyCodeLine{    FooPlugin: new FooPlugin()}
\DoxyCodeLine{  \})}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{// v1}
\DoxyCodeLine{const smp = new SpeedMeasurePlugin(smpOptions);}
\DoxyCodeLine{const webpackConfig = smp.wrap(\{}
\DoxyCodeLine{  plugins: [new FooPlugin()]}
\DoxyCodeLine{\}); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_speed_measure_webpack_plugin_migration_autotoc_md28645}{}\doxysubsection{If Using Custom Names}\label{md_sfcode_node_modules_speed_measure_webpack_plugin_migration_autotoc_md28645}
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 {\ttfamily options.\+plugin\+Names} option\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{const fooPlugin = new FooPlugin();}
\DoxyCodeLine{const smp = new SpeedMeasurePlugin(\{}
\DoxyCodeLine{  pluginNames: \{}
\DoxyCodeLine{    customFooPluginName: fooPlugin}
\DoxyCodeLine{  \}}
\DoxyCodeLine{\});}
\DoxyCodeLine{const webpackConfig = smp.wrap(\{}
\DoxyCodeLine{  plugins: [fooPlugin]}
\DoxyCodeLine{\}); }

\end{DoxyCode}
 