lib/classes/PluginManager.js/PluginManager/resolveServicePlugins
class PluginManager:  resolveServicePlugins(servicePlugs) {
    const pluginsObject = this.parsePluginsObject(servicePlugs);
    const servicePath = this.serverless.config.servicePath;
    return pluginsObject.modules
      .filter(name => name !== '@serverless/enterprise-plugin')
      .map(name => {
        let Plugin;
        try {
          Plugin = requireServicePlugin(servicePath, name, pluginsObject.localPath);
        } catch (error) {
          if (!isModuleNotFoundError(error, name)) throw error;

          // Plugin not installed
          if (this.cliOptions.help || this.cliCommands[0] === 'plugin') {
            // User may intend to install plugins just listed in serverless config
            // Therefore skip on MODULE_NOT_FOUND case
            return null;
          }

          throw new this.serverless.classes.Error(
            [
              `Serverless plugin "${name}" not found.`,
              ' Make sure it\'s installed and listed in the "plugins" section',
              ' of your serverless config file.',
            ].join('')
          );
        }
        if (!Plugin) {
          throw new this.serverless.classes.Error(
            `Serverless plugin "${name}", didn't export Plugin constructor.`
          );
        }
        return Plugin;
      });
  }