Example with minification?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Example with minification?


Is there an example, preferably with Spring Boot that shows how to combine Spring Boot and Thymeleaf and have minification of the CSS and JS? Ideally, this minification should happen in a Maven build step that is only enabled when building with a `production` profile and the URLs in the HTML should keep working even though the name changes from `application.css` to `application.min.css` for example.

Has anybody set something like this up? I am wondering if using https://wro4j.readthedocs.io/en/stable/MavenPlugin/ is the best way, or if it is better to use the https://github.com/eirslett/frontend-maven-plugin and use one of the supported tools like Yarn or NPM to do this.