Closed ia3andy closed 1 month ago
We discussed it with @cescoffier and here is the proposed solution:
Create a new GeneratedStaticResourceBuildItem(String publicPath, byte[] content)
, the BuildStep will take care of:
GeneratedResourceBuildItem
and NativeImageResourceBuildItem
For the dev handled, a lot of logic can be extracted from here: https://github.com/vert-x3/vertx-web/blob/master/vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
Can assign it to me @ia3andy ?
@mcruzdev I found a good follow issue for you :)
Describe the bug
Currently, if there is no
meta-inf/resources
files, then Quarkus is using a cache when instantiating the StaticHandler, when using AdditionalStaticResourceBuildItem, we don't necessarily have ameta-inf/resources
at buildtime as it's generated.This leads to caching issue as described here: https://github.com/quarkiverse/quarkus-web-bundler/issues/171
Expected behavior
Files added with
AdditionalStaticResourceBuildItem
shouldn't be cached in dev-mode.The solution might be to split in to handers:
AdditionalStaticResourceBuildItem
) on which cache is disabled in dev mode