-
Notifications
You must be signed in to change notification settings - Fork 166
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
Track changes in parent theme #19887
Comments
The parent theme is tracked, provided you have a multi module project with the parent and the child theme. But you are saying that your setup is such that you build a jar of the parent theme, copy it somewhere and then you want hot deployment to work? |
In com.vaadin.base.devserver.ExternalDependencyWatcher, the parent pom is evaluated for its child modules. |
So what is the project layout like? |
Our project structure is like this:
Meanwhile I found a solution for us with the mentioned property. |
A few thoughts for next steps:
@TobiasSagmeister could you please share which mode do you use (Vite dev server or bundle) and what is the Vaadin version? |
@mshabarov Sure, we use Vite-Server with Vaadin 24.4.6. |
Describe your motivation
For Vaadin themes, there is a file called theme.json which has a property parent for the parent theme.
With this property it is possible to achieve inheritance of themes.
In dev mode, only the current theme, not the parent one, is tracked for changes.
Therefore the server has to be restarted on each change in the parent theme.
In our case the themes are located in own modules.
Describe the solution you'd like
The parent theme should be tracked for changes as well.
So no restart of the server is needed.
Describe alternatives you've considered
The default maven way in com.vaadin.base.devserver.ExternalDependencyWatcher is to consider only the maven parent and its child modules. In case there is a child module which has a dependency to another module with resources (e.g. the parent theme), it does not work.
There is an undocumented property called frontend.hotdeploy.dependencies.
It defines a comma-separated list of folders to monitor in com.vaadin.base.devserver.ExternalDependencyWatcher.
With this property it works for such use cases as kind of workaround.
Additional context
This feature request was discussed previously via Vaadin Expert Chat.
The text was updated successfully, but these errors were encountered: