public function updateFieldMetaInfo($field_code, array $field) {
    $config = $this->configFactory->getEditable(self::BASE_FIELD_ADDITIONS_CONFIG);
    $existing_fields = $config->getRawData();

    if (empty($existing_fields[$field_code])) {
      throw new \Exception('Field not available, try adding it first.');
    }

    // Checks to avoid errors.
    $field_structure_info = [
      'type',
      'cardinality',
    ];

    foreach ($field_structure_info as $info) {
      if (isset($field[$info]) && $field['type'] != $existing_fields[$field_code]['type']) {
        throw new \Exception('Can not modify field structure.');
      }
    }

    // Need to apply entity updates for following.
    $apply_updates = FALSE;
    $field_labels_info = [
      'label',
      'description',
      'visible_view',
      'visible_form',
      'weight',
    ];

    foreach ($field_labels_info as $info) {
      if (isset($field[$info]) && $field['type'] != $existing_fields[$field_code]['type']) {
        $apply_updates = TRUE;
        break;
      }
    }

    $existing_fields[$field_code] = array_replace($existing_fields[$field_code], $field);
    $config->setData($existing_fields)->save();

    if ($apply_updates) {
      $this->entityDefinitionUpdateManager->applyUpdates();
    }
  }