Closed tepi closed 1 month ago
At the moment, the property is needed in maven/gradle configuration and as a runtime property depending on how application is build and run.
It's required in maven/gradle configuration when building:
prepare-frontend
goalbuild-frontend
goalIn runtime in development mode, it depends how application is run.
Maven/gradle configuration works when run with maven.
Maven/gradle configuration is ignored when running directly with java
command, or via IDE's Run option in UI.
When running in production mode, default value is based on the production bundle which was build with build-frontend
goal. Overriding it with runtime property should not be recommended because then app could be build with/without react, but some runtime feature could think otherwise.
To avoid issues, we should probably recommend adding it in both places and keeping them always same value in both places.
Property is mentioned at least in following pages:
One possibility to document is to have in pom.xml
<properties><reactEnable>true</reactEnable></properties>
and have in the default application.properties
vaadin.react.enable=@reactEnable@
This would sync the pom.xml and application.properties values for the flag.
Description of the bug
Currently it is possibly not clear how to use the
react.enable
flag properly. We need to test which is the correct way of usage and make sure the documentation is up-to-date with that.