File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -163,18 +163,22 @@ export async function resolvePlugins(
163163
164164 const pluginCreatorOptions = { contentDir : configDir } ;
165165
166+ const requiredPluginInstances = Array . isArray ( requiredPlugin )
167+ ? requiredPlugin
168+ : [ requiredPlugin ] ;
169+ for ( const requiredPluginInstance of requiredPluginInstances ) {
170+ if ( requiredPluginInstance ?. id && isDeprecatedPluginFormat ( requiredPluginInstance ) ) {
171+ logger . info ( `Deprecated plugin format detected: ${ requiredPluginInstance . id } \n` ) ;
172+ }
173+ }
174+
166175 const pluginModule = isDeprecatedPluginFormat ( requiredPlugin )
167176 ? requiredPlugin
168177 : isCommonJsPlugin ( requiredPlugin )
169178 ? await requiredPlugin ( pluginCreatorOptions )
170179 : await requiredPlugin ?. default ?.( pluginCreatorOptions ) ;
171180
172181 const pluginInstances = Array . isArray ( pluginModule ) ? pluginModule : [ pluginModule ] ;
173- for ( const pluginInstance of pluginInstances ) {
174- if ( pluginInstance ?. id && isDeprecatedPluginFormat ( pluginInstance ) ) {
175- logger . info ( `Deprecated plugin format detected: ${ pluginInstance . id } \n` ) ;
176- }
177- }
178182
179183 if ( pluginModule ) {
180184 pluginsCache . set (
You can’t perform that action at this time.
0 commit comments