function replaceUnifiedRoutesKeys(kebabedName, filePath) {
  let newString = kebabedName;
  filePath.split(_path.default.sep).forEach(part => {
    if (part[0] === `[` || part[0] === `{`) {
      const match = /(\[(.*)\]|\{(.*)\})/.exec(part);
      newString = newString.replace(`-${match[2] || match[3]}-`, `-${match[0]}-`);
    }
  });
  return newString;
}
// the {} and [] are kept in the componentChunkName. Also there are tests for this.
the {} and [] are kept in the componentChunkName. Also there are tests for this.
the {} and [] are kept in the componentChunkName . Also there are tests for this .
function replaceUnifiedRoutesKeys(kebabedName, filePath) {
  let newString = kebabedName;
  filePath.split(_path.default.sep).forEach(part => {
    if (part[0] === `[` || part[0] === `{`) {
      const match = /(\[(.*)\]|\{(.*)\})/.exec(part);
      newString = newString.replace(`-${match[2] || match[3]}-`, `-${match[0]}-`);
    }
  });
  return newString;
}
function replaceUnifiedRoutesKeys ( kebabedName , filePath ) { let newString = kebabedName ; filePath . split ( _path . default . sep ) . forEach ( part => { if ( part [ 0 ] === ` ` || part [ 0 ] === ` ` ) { const match = / (\[(.*)\]|\{(.*)\}) / . exec ( part ) ; newString = newString . replace ( ` ${ match [ 2 ] || match [ 3 ] } ` , ` ${ match [ 0 ] } ` ) ; } } ) ; return newString ; }
the {} and [] are kept in the componentChunkName.
the {} and [] are kept in the componentChunkName .