code: function isPackage(loaderLessRawRequest, resourcePath, modulesDirectories) {
      return modulesDirectories.some(dir => {
          return resourcePath.indexOf(dir) !== -1;
      }) && !['.', '/'].some(val => {
          return val === loaderLessRawRequest[0];
      });
  }
docs: A module is considered a package if a) it does not being with './',
  '/' or '../' and b) it's in a `config.resolve.modulesDirectories` dir.
  @param  {String}  loaderLessRawRequest The raw request (without loaders).
  @param  {String}  resourcePath         The absolute resource path.
  @param  {Array}   modulesDirectories   Array of module directories, e.g. 'node_modules',
  'web_modules' etc.
  @return {Boolean}