Missing MultiSelectComboBox in production mode

Hello we are currently upgrading a Vaadin 23 project to Vaadin 24.
In dev mode everything works fine, but in production mode, we get this error message in the tomcat 10.x logs:

ERROR com.vaadin.flow.component.internal.UIInternals - The component class com.vaadin.flow.component.combobox.MultiSelectComboBox includes ‘@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.
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(MultiSelectComboB
ox.class) where it is used.

We run the build taks as a github action, which in turn uses maven to do the job.
Here is the maven build command we use
mvn package -U -B -Pproduction --file pom.xml

Any idea what might cause the problem?

In production mode the javascript bundle is split into chunks, so the multi-select-combo-box might in a chunk. The chunks are supposed to be loaded automatically when needed (for example when a specific view needs the multi-select-combo-box).
In your case, Vaadin thinks the component is not needed for this view. I had the issue when I loaded the component with a Factory.
One thing you can try is to not generate the chunks (it might be a premature optimization). You can do this by adding @LoadDependenciesOnStartup on your class that implements AppShellConfigurator. See the documentation: https://vaadin.com/docs/latest/production/production-build#eager-loading

(You might have a different issue, but adding the annotation is easy to try)

Thanks, this did the trick