Closed jcgueriaud1 closed 1 year ago
Does it matter in any way how they are combined or just that it would be one file that always has the same name?
It doesn't matter to me. I'm not planning to check what's in the file (if I need to debug I will use the frontend hotdeploy).
Maybe @mstahv has another opinion.
I have exactly the same opinion. So far I haven't looked into those files either.
But a perfect solution would be that the file is not stored in source code management system at all. It is a generated file, so kind of against the best practices. If only there was a cloud service that would store the bundles and share them with other who have the same front-end resources 🤪
This could probably be done so that instead of using a dev bundle from src/main/dev-bundle
(and storing a new one in the same place) we would use target/dev-bundle
for that. When creating a new bundle we would also compress it (e.g. tar or whatever is fast) as src/main/dev-bundle/dev.bundle
. When using the bundle and target/dev-bundle
does not exist, we would decompress src/main/dev-bundle/dev.bundle
, if it exists.
There is probably no need to change how we handle the default dev bundle as compressing it inside a jar sounds unnecessary
Acceptance Criteria:
src/main/dev-bundle/dev.bundle
single file, so it would be easier to commit it to the VCStarget/dev-bundle
(Maven) or build/dev-bundle
(Gradle) and uses them in runtimevaadin:clean-frontend
and re-build the dev-bundle again to get the compressed file.
Describe your motivation
When a javascript file is updated in the project the dev-bundle is regenerated and a lot of files are removed and recreated (with a different unique name). So the git status contains multiple updated files and 26 files added and 26 files removed. That also happen when the Vaadin version is updated.
Describe the solution you'd like
I'd propose to also combine the generated files into one, so that it wouldn't look so massive change now whenever one updates a Vaadin version or fixes a typo in a javascript file.
See here also: https://github.com/vaadin/flow/issues/16028#issuecomment-1459690490