WebOptimizer icon indicating copy to clipboard operation
WebOptimizer copied to clipboard

Incorrect relative URL and missing fingerprint for bootstrap icons font

Open bjowes opened this issue 1 year ago • 4 comments

Our project uses Bootstrap, which includes icon fonts imported through CSS. After a recent update of the WebOptimizer library, the reference to the fonts is incorrect so they are not loaded by the site.

Path to bootstrap CSS: /lib/bootstrap/dist/css/bootstrap.css Path to font file: /lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 Path to bundle where bootstrap CSS is included: /css/bundle.css

The import line in bootstrap CSS for the font file: url("../fonts/glyphicons-halflings-regular.woff2")

WebOptimizer 3.0.420 renders this in the bundle (correct relative path and fingerprint): url("../lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2?v=93DUFX3R5ukJzB3V5fxFMdNdyXY")

WebOptimizer 3.0.422 (and up) renders this in the bundle (incorrect relative path, no fingerprint): url("../../lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2")

The only change between those versions was #320, so the new behavior was introduced there. I spent some time looking through the changes but I'm not familiar enough with the code base to identify the exact root cause.

We can roll back to 3.0.420 for now but I expect that others will bump into this issue too.

bjowes avatar Aug 23 '24 08:08 bjowes