Production mode breaks TextField

Christian,

Just a guess, but it might be that the optimizer is eliminating the TextField. When you package for production, only the used components are included.

In your case, it might be that the optimizer determined that the TextField was never used and elimitated it from the production bundle. One way to circumwent would be to include a TextField in one of your other views.

From

https://vaadin.com/docs/v14/flow/production/tutorial-production-mode-basic.html

Bundling is an optimisation where we merge multiple files to a collection so that the browser doesn’t need to request so many files making loading faster.

In 14.1 you can turn off the optimization to help debug issues:

https://vaadin.com/docs/v14/flow/production/tutorial-production-mode-advanced.html

optimizeBundle (default: true): Whether to include only frontend resources used from application entry points (the default) or to include all resources found on the class path. Should normally be left to the default, but a value of false can be useful for faster production builds or debugging discrepancies between development and production mode. This feature is available only in Vaadin Platform 14.1 and newer.