Open bernhard-1 opened 4 months ago
This would be expected as the bundle may contain more than needed, but not be missing required packages. the list only defines what we packages we should scan for frontend file annotations and having an app bundle with required parts will not trigger generation of a new one if packages are removed as the bundle is not an optimisation, but a dx feature that makes startup faster by not requiring npm and vite execution for everything.
For a production build the flag vaadin.force.production.build
can be set to always generate a new optimized production build even if a bundle would exist.
I guess this goes both ways. If you add some new functionality in a package that isn't included, then you will believe it's broken if it isn't automatically picked up when you change the configuration to include the new package.
That is a problem when running the application class with accepted packages marked wrong. We only use block-list to skip packages by default to not come upon this issue. Also the list does not affect maven or gradle run builds (e.g. production build)
(edit) So yes if you fix the package setup so that a new frontend import or file is found that is not in the bundle then the bundle would be rebuilt as it doesn't contain the required parts. So too much data is fine, but missing parts require rebuild.
Description of the bug
When the application property vaadin.whitelisted-packages is reduced, the front-end development bundle is not automatically rebuilt. This leads to the situation, that an erroneous change to vaadin.whitelisted-packages has no immediate impact. Instead the erroneous behaviour becomes only visible e.g. after some completely unrelated change in a css-file.
Expected behavior
Every modification of vaadin.whitelisted-packages should immediately trigger a rebuild of the front-end development bundle.
Minimal reproducible example
Run apexchartsdemo as spring boot application -> graphs are shown in browser Change vaadin.whitelisted-packages to "none" -> application is restarted and graphs are still visible Delete src/main/bundles and target/dev-bundle and restart application -> graphs are no more visible
Versions