How can I load a custom twig template depending on a view mode? Currently I have the following code in my module file:
function mymodule_theme_suggestions_credit_report(array $variables) {
  return [
    'pdf_report__' . $variables['elements']['#view_mode']
  ];
}

function mymodule_theme($existing, $type, $theme, $path) {
  return [
    'pdf_report' =&gt; [
      'render element' =&gt; 'elements'
    ]
  ];
}

And I have inside /mymodule/templates/ 2 twig files

pdf-report.html.twig (just added the code from entity-html.twig)
pdf-report--new-style.html.twig

And I have a view mode in my pdf-report called new_style.
I've read documentation and it looks like this should work, but it doesn't.
I tried doing the following:
function mymodule_theme_suggestions_credit_report(array $variables) {
  return [
    'pdf_report__' . $variables['elements']['#view_mode']
  ];
}

function mymodule_theme($existing, $type, $theme, $path) {
  return [
    'pdf_report' =&gt; [
      'render element' =&gt; 'elements',
      'template'  =&gt; 'pdf-report--orcutt-style',
      'base hook' =&gt; 'pdf_report',
    ]
  ];
}

But this replaces all of the view modes, not just the one I want.
Now the new theme hook is the same as the base hook. You need to declare the more specific theme suggestion as hook:
function mymodule_theme($existing, $type, $theme, $path) {
  return [
    'pdf_report__new_style' =&gt; [
      'base hook' =&gt; 'pdf_report',
    ],
  ];
}