Generic field.html.twig template for a custom Entity I have a custom Entity called custom_entity, along with a custom module which provides twig templates for my bundles and their fields.
How can I define a generic/base field template for all fields created under custom_entity?
For a specific field I could create the template:
field--custom-entity--field-my-field.html.twig

But I'm looking to do something more general, like:
field--custom-entity.twig

Where all my fields created on a custom_entity use this base template.
I don't want to modify field.html.twig in the theme. I want this template to only apply to my entity and its bundles.
Add your own theme suggestion:
mymodule.module
/**
 * Implements hook_theme_suggestions_field_alter().
 */
function mymodule_theme_suggestions_field_alter(array &amp;$suggestions, array $variables) {
  $element = $variables['element'];
  // place the least specific suggestion at the beginning of the array  
  array_unshift($suggestions, 'field__' . $element['#entity_type']);

}