From cd1b294bd3a69e379af74688d0986acdfe72ca95 Mon Sep 17 00:00:00 2001 From: Andy Damevin Date: Fri, 12 Jan 2024 15:53:28 +0100 Subject: [PATCH] Disable static server cache in dev mode --- .mvn/extensions.xml | 2 +- docs/modules/ROOT/pages/advanced-guides.adoc | 6 ++++-- integration-tests/src/main/resources/application.properties | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml index 108a01f..ea04cb2 100644 --- a/.mvn/extensions.xml +++ b/.mvn/extensions.xml @@ -3,6 +3,6 @@ io.mvnpm locker-maven-plugin - 0.0.4 + 0.0.6 \ No newline at end of file diff --git a/docs/modules/ROOT/pages/advanced-guides.adoc b/docs/modules/ROOT/pages/advanced-guides.adoc index cf31d5b..e8e2977 100644 --- a/docs/modules/ROOT/pages/advanced-guides.adoc +++ b/docs/modules/ROOT/pages/advanced-guides.adoc @@ -20,6 +20,8 @@ The Web-Bundler is natively integrated with Qute to render html templates at bui Combined with the <>, this file will be rendered with the scripts and styles tags to include in your html template. This file will be served as the default index file (e.g. http://localhost:8080/). +NOTE: You can use the Qute `config:` https://quarkus.io/guides/qute-reference#config[namespace], it will be evaluated a build-time (runtime config will be ignored). + IMPORTANT: This rendering option is happening at build time, so you won't be able to access any Qute runtime data in this file. If you want to render data (for example in a server-side rendering app with htmx), you should add the Qute Web extension (or https://quarkiverse.github.io/quarkiverse-docs/quarkus-renarde/dev/[Renarde extension] for MVC with Qute) and use `src/main/resources/templates/` directory instead. The <> will also work in this case. == Bundling @@ -222,14 +224,14 @@ NOTE: In case of web dependencies versions conflicts, you can set the version to [#locking] === Locking dependencies -As the NPM ecosystem is over-using version ranges for dependencies, just a few npm dependencies can lead to a big amount of poms to download in order to get the right versions for your project. This leads to long lasting minutes of downloading poms when cloning or during CI. To solve this problem and also to make your build reproducible it is highly recommended to lock your web dependencies versions. +As the NPM ecosystem is over-using version ranges for dependencies, just a few npm dependencies can lead to a big amount of poms to download in order to get the right versions for your project. This leads to long lasting minutes of downloading poms when cloning or during CI. To solve this problem and also to make your build reproducible it is highly recommended to lock your web dependencies versions. *This way it will be long only the first time and then it will be fast and reproducible.* [#maven-locking] ==== Locking with Maven (mvnpm Locker Maven Plugin) As Maven doesn't provide a native version locking system, the mvnpm team has implemented a way to easily generate and use a locking pom.xml (BOM). The locker Maven Plugin will create a version locker BOM for your org.mvnpm and org.webjars dependencies. It is essential as NPM dependencies are over using ranges. After the locking, the quantity of files to download is considerably reduced (better for reproducibility, contributors and CI). -It is easy to set up, https://github.com/mvnpm/locker#lock-your-mvnpm-and-webjars-versions[here is the documentation]. +It is easy to set up and update, https://github.com/mvnpm/locker#lock-your-mvnpm-and-webjars-versions[here is the documentation]. [#gradle-locking] ==== Locking with Gradle diff --git a/integration-tests/src/main/resources/application.properties b/integration-tests/src/main/resources/application.properties index a8f119b..dcf2732 100644 --- a/integration-tests/src/main/resources/application.properties +++ b/integration-tests/src/main/resources/application.properties @@ -1,3 +1,4 @@ +%dev.quarkus.http.static-resources.caching-enabled=false quarkus.log.category."io.quarkiverse.web.bundler".level=DEBUG quarkus.log.category."io.mvnpm.esbuild".level=DEBUG quarkus.web-bundler.bundle.page-1=true