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
Custom theme live-reload doesn't work for newly added stylesheet files #10544
Comments
When the generated theme files were moved into separate folder, this code did not changed (webpack config file): const themeName = extractThemeName(flowFrontendThemesFolder); It should have extracted the theme name from This also shows how necessary it is to maintain the tests in a good condition. |
@mshabarov I'd like to note that this is not even supposed to work - you have to reference the added file in |
Good point! The watch folder is a whole theme folder, and thus adding any file to theme folder root triggers the live reload at the moment. This comment forces me to think what if we switch the theme on fly...then the live-reload for components folder in the new theme folder won't works because it was not set up initially. |
So can the live reload expand the watcher scope but be made context aware - I mean that we would watch everything under |
Well, the problem is that the theme live reload plugin should know what is the current theme name to be able to exclude the changes in non-active folder. |
Watch the components folder for component styles update. Other folders or CSS files except 'styles.css' should be referenced from `styles.css` anyway, so no need to watch them. Related-to #10544
Watch the components folder for component styles update. Other folders or CSS files except 'styles.css' should be referenced from `styles.css` anyway, so no need to watch them. Related-to #10544
Created a separate issue for it #10680 |
This ticket/PR has been released with platform 19.0.5. For prerelease versions, it will be included in its final version. |
This ticket/PR has been released with platform 14.6.0.beta2. For prerelease versions, it will be included in its final version. |
Description of the bug / feature
Since V19.0.0.alpha5 the custom theme live-reload (webpack re-compilation) is not being triggered upon adding a new stylesheet files (or any other files) into
frontend/themes/my-custom-theme/
(includingcomponents
folder).It works fine with V19.0.0.alpha4.
Minimal reproducible example
Vaadin 19
in the Settings tabmvn
vaadin-button.css
(or any other name) to the{project.root}/frontend/themes/myapp/components/
foo.css
(or any other name) to the{project.root}/frontend/themes/myapp/
vaadin.version
to 19.0.0.alpha4 inpom.xml
, deletenode_modules
and any generated files in project root, then runmvn clean spring-boot:run
Expected behavior
Webpack re-compiles and the application restarted, applying a newly added styles.
Actual behavior
Nothing happens upon adding a new file.
Versions:
The text was updated successfully, but these errors were encountered: