miracle2k/flask-assets — Issue #15: cssrewrite is broken with blueprints
Author: jace
Created: 2012-02-12 00:40:04+00:00
State: open

The `cssrewrite` filter doesn't work as expected with bundles exposed by a blueprint.

If a blueprint at `/blueprint` exposes `css/blue.css` as a static file, the Flask URL is `/blueprint/css/blue.css'. If this file is integrated into the app's static folder with `cssrewrite`, becoming `/static/css/app.css`, URLs aren't rewritten with `../../blueprint/css`. They instead get `../blueprint/static/css`, reflecting the actual path on disk.

Since Flask-Assets and webassets are capable of resolving paths to blueprints, this appears to be an oversight in the `cssrewrite` filter.