code: function resolve(to, importPath, fileType) {
    importPath =
      path.extname(importPath) === '' ? `${importPath}.${fileType}` : importPath
    if (importPath.startsWith('/')) {
      return importPath
    } else if (matchModuleImport.test(importPath)) {
      return require.resolve(importPath.replace(matchModuleImport, ''))
    }
    return path.join(path.dirname(to), importPath)
  }
docs: Resolves the path to the file/module.
  
  @param {String} to - the name of the file to resolve to
  @param {String} importPath - the local path
  @param {String} fileType - extension of the file to be resolved
  @returns {String} path - path to the file to import