rollup.config.js
function parseName(name) {
  if (name) {
    const arr = name.split('.')
    const len = arr.length

    if (len > 2) {
      return arr.slice(0, -1).join('.')
    }
    else if (len === 2 || len === 1) {
      return arr[0]
    }
  }
  return name
}
function parseName(name) {
  if (name) {
    const arr = name.split('.')
    const len = arr.length

    if (len > 2) {
      return arr.slice(0, -1).join('.')
    }
    else if (len === 2 || len === 1) {
      return arr[0]
    }
  }
  return name
}
function parseName ( name ) { if ( name ) { const arr = name . split ( '.' ) const len = arr . length if ( len > 2 ) { return arr . slice ( 0 , - 1 ) . join ( '.' ) } else if ( len === 2 || len === 1 ) { return arr [ 0 ] } } return name }
remove pkg.name extension if exists
remove pkg . name extension if exists