Vaadin 14 - npm - production mode - shadow-roots not created

Hey.

I changed from Vaadin 14 compatibility mode bower to npm. Everything was fine and worked out.

But now, when i build the app in production mode, a self-created webcomponent (item) within a self-created webcomponent (list) within a self-created webcomponent (route) does not get a shadow-root and so the styling does not work.
I create list and items(s) dynamically and append them to the parent’s slot.

  • i put everthing in slots
  • Route has a shadow root
  • list has a shadow root
  • item does not have a shadow root

This did work in bower mode, by the way…

it is not just a problem of the 3rd level.
sometimes the shadow-root is not created…

comparison between debug mode and production mode
18337442.png
18337445.png

i added some @JsModule Annotations, and this way all hidden/unclear dependencies are loaded in advanced and it is working fine