quarkiverse / quarkus-web-bundler

Create full-stack web apps quickly and easily with this Quarkus extension. It offers zero-configuration bundling for your web app scripts (JS, JSX, TS, TSX), dependencies (jQuery, React, htmx, etc.), and styles (CSS, SCSS, SASS).
https://docs.quarkiverse.io/quarkus-web-bundler/dev/index.html
Apache License 2.0
19 stars 10 forks source link

Handle public path for bundling and optionally allow CDN #125

Closed ia3andy closed 10 months ago

ia3andy commented 10 months ago

This improves how {quarkus.web-bundler.bundle-path} is used:

When configured with an internal path (e.g. 'foo/bar'), Bundle files will be served on this path by Quarkus (prefixed by {quarkus.http.root-path}).

When configured with an external URL (e.g. 'https://my.cdn.org/'), Bundle files will NOT be served by Quarkus and all resolved paths in the bundle and mapping will automatically point to this url (a CDN for example).

Before this {quarkus.http.root-path} was not considered by the web-bundler.

IMPORTANT: This means that imported images in js and css now have the correct path by default and won't require to be prefixed by /static/bundle.