-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
frontendHotploy isn't working for a Vaadin multi-module gradle project #20992
Comments
Did you try this property? At least in Maven it works. <properties>
<vaadin.frontend.hotdeploy.dependencies>../moduleB</vaadin.frontend.hotdeploy.dependencies>
</properties> |
The property frontendHotdeployDependencies is not available in a gradle project
|
|
Setting the path to module B to system property We need to document this property as it was created exactly for such use cases - it tells Vite dev server HMR what module to watch. |
Additional observations:
We have to test and be sure that this property works consistently. |
Tried this just now and got it working with a few minor changes. I'm not exactly sure what you're using to run the app, I was using Jetty via Gretty plugin. First issue is that Gradle does not forward system properties to the Jetty process it starts so I had to add a line for that in Gretty section of the root project's
If you're using e.g. Spring I think there's a similar way to pass the system properties to that process as well. Second issue is the separator for multiple paths, which is actually
Do also note the Please try it out and let me know if you still have issues. Note to Flow team: we most likely need to update documentation about how to do this. |
Another thing to consider internally is that if the Flow Gradle Plugin would have |
There is
Mentioned in the issue description. |
Thanks, missed that. Maybe I'll wait for more info or test results from the author. Quickly searching I could not find a Wildfly plugin for Gradle (well there was something last updated 2018), so not sure how to run it in dev mode with Wildfy+Gradle combination. |
Activating a feature flag in the project does not work when a default bundle is used because the values of the flags sent to the client are hard-coded at bundle build time. Additionally, if a feature flag is active during bundle creation, it remains active on the client side even if the project does not activate it in the `vaadin-featureflags.properties` file. This change ensures that feature flags in the frontend bundle are always disabled initially and are activated on page load based on the current project settings. Fixes #20992
Separated by a comma, the system property works The project consists of two Vaadin Gradle Starter templates (https://github.com/vaadin/base-starter-gradle) with the customizations from the initial request (Minimal reproducible example). It is started with the default Wildfly (https://www.wildfly.org/downloads/) and the VM options (-Dvaadin.frontend.hotdeploy.dependencies). And to the other addition: It would be very helpful if the Flow Gradle plugin would have frontendHotdeployDependencies as a configuration property. |
Tried my project with latest Wildfly with the same result: both the root project and the two sub-project hotdeploy works correctly. I probably have something set up differently than you do, but right now I can't see it. I'll attach my project here so you can take a look at what is the difference. Please note the root |
The difference between our projects is that the frontend folder of the main project is under src/main/frontend. In my project, it is located under src/main/resources/META-INF/resources/frontend, just like in the components projects. The reason for this is that the main project is also only a part of another overall project. As a comparison in our example, we can say that the individual “components” projects can be started alone for development purposes with development routes to display/develop the components in isolation. In this case, the frontendHotdeploy does not work (provided, of course, that frontendHotdeploy = true is set in the build.gradle of the components project). Setting the frontendDirectory in build.gradle did not help either: |
Related Docs issue: vaadin/docs#2412 |
Description of the bug
I have a Vaadin 24 multi-module gradle project where I want to use the frontendHotdeploy so that I don't have to restart the server every time I make a css or js change. Unfortunately the hotdeploy does not work in this constellation.
In the Vaadin 24 gradle starter template, the frontend folder is under src/main/frontend. In a multi-module project it must be under src/main/resources/META-INF/resources/frontend. Otherwise, an error message will appear at startup stating that the files cannot be found. If the frontendHotploy flag is now set to true in build.gradle, it no longer works
Expected behavior
The hotreload of css and js works so that the server does not have to be constantly restarted
Minimal reproducible example
Two Vaadin 24 gradle starter projects where one is added as a dependency via build.gradle.
Project 1:
Project 2:
settings.gradle:
rootProject.name = 'project-main'
include(":project-components")
project(":project-components").projectDir = new File("../project-components")
build.gradle
vaadin {
frontendHotdeploy = true;
}
dependencies {
implementation(project(":project-components"))
}
Versions
The text was updated successfully, but these errors were encountered: