Few Components not rendering in production mode

c.v.flow.component.internal.UIInternals : The component class com.vaadin.flow.component.tabs.TabSheet includes '@vaadin/tabsheet/src/vaadin-tabsheet.js' but this file was not included when creating the production bundle. The component will not work properly. Check that you have a reference to the component and that you are not using it only through reflection. If needed add a @Uses(TabSheet.class) where it is used.

Why does this happen in production mode with components DatePicker, Combobox and TabSheet?

Just annotate class where you use TabSheet with:

@Uses(TabSheet.class)

It was working previously without this annotation.

That’s why I want to know what’s happening?

Could you please provide information about the previous working Vaadin version and the one that’s currently failing?

No Version changes were done.( Version - 24.5.7)
It was working fine in both development mode and production mode.

I did add apex charts addon. That’s all that was changed.

I did a starter project with the same addon and it works fine in production mode.

If I had to guess, before the add-on, it was working “on accident” on account of the default bundle. Once the add-on was added, it couldn’t use the default bundle any longer, and scanned accessible packages for used components, and the scan couldn’t find the missing components (as it wouldn’t have done previously, if the scan had run)

1 Like

The Issue has been fixed by the addition of

<configuration>
	<optimizeBundle>false</optimizeBundle>
</configuration>

I hadn’t been using this configuration until now, and everything was working fine. However, when I encountered this specific issue, adding this configuration fixed the problem.

May I ask you to rerun the maven build with -X flag and optimizeBundle=true and post the output, so that we can try to figure out why the optimized bundle is not working?
If you prefer, you can also create an issue on the Flow GitHub repository , also linking this forum thread.

Here’s issue with the output log using

<configuration>
	<optimizeBundle>true</optimizeBundle>
</configuration>

Github Issue