ServiceStack/Bundler — pull request #61 by osi-oswald (2014-05-26 13:12:22+00:00)
Title: bundler.js does no Url rebase by default

When bundling CSS files in sub or parent directories, relative URL references will always be broken in the resulting bundle output.

Ex.:
/Content/Foo/foo.css:
.foo { background-image:url('images/foo.png') }
/Bar/bar.css:
.bar { background-image:url('images/bar.png') }

/Content/mybundle.css.bundle:
Foo/foo.css
../Bar/bar.css

Then the resulting bundle output will be:
/Content/mybundle.min.css
.foo { background-image:url('images/foo.png') }
.bar { background-image:url('images/bar.png') }

But it in fact should be:
.foo { background-image:url('Foo/images/foo.png') }
.bar { background-image:url('../Bar/images/bar.png') }

By leveraging the features of CleanCss, this issue could be easily fixed.

Some remarks:
- Since CleanCss does not export a 'UrlRebase' module, CSS content might be minified twice when added to allMinCssArr
- The resulting mybundle.css file will still have invalid URL references (only mybundle.min.css will be corrected by this fix)
- Without the 'noAdvanced' option, we noticed some side effects in the processed CSS by CleanCss

Without a URL rebase strategy, we won't be able to make use of bundler :(