Vaadin 24 production an development diference

Hello,

i have question about development and production compailig.
In development there are tabls on my mask but in production there is no tabs.
Same thing is with text fields. In development mode fiald are stretched from edge to edge, but in production they are not.

thanks
primož
image.png
image.png
image.png
image.png

The production bundle does not include the vaadin-tab (and maybe other javascript component). That’s the reason you have this issue.
Normally it’s detected by using the Java component Tab. Are you using the Java API?
If no, you need to tell Vaadin that you are using it by adding @Uses(Tab.class)

The other explanation is that Vaadin doesn’t know that you are using the dialog. (and the components inside). It depends a bit of how you are using the dialog.
Which version of Vaadin are you using?

We are using 24.1.12 and java 20

We are using tab : com.vaadin.flow.component.tabs.Tab;

and Java API

You can try to add @LoadDependenciesOnStartup on top of your class that implements AppShellConfigurator. It will load all the components your application is using. You can find more explanation here: Production Build | Deploying to Production | Vaadin Docs

I would also suggest to upgrade the Vaadin version. 24.1.12 is quite old and several fixes have been applied later on

I remember an old issue that tab was missing in the default prod bundle. It would be best to upgrade to the latest versions.

Thanks all, i upgrade vaadin on 24.3.3 and add LoadDependenciesOnStartup and it works. I also add parameter on buliding project : vaadin.force.production.build = true