Skip to content
Browse files
feat: add rewrite option (#368)
So that the `postcss-url` functionality is configurable and can be disabled in a less surprising way.

BREAKING CHANGE: To prevent `postcss-url` from running you now specify `rewrite: false` instead of defining an `after` segment.
  • Loading branch information
tivac committed Nov 16, 2017
1 parent 867ba99 commit 9bae5438718ec73b87620e589c9cd163fd9deb15
@@ -54,7 +54,7 @@ new Processor({

Specify an array of PostCSS plugins to be run after files are processed, but before they are combined. Plugin will be passed a `to` and `from` option.

**By default** [`postcss-url`]( is used in `after` mode.
**By default** [`postcss-url`]( is run after any plugins defined in the `after` hook. To disable it see the [`rewrite`](#rewrite) option.

new Processor({
@@ -72,6 +72,25 @@ new Processor({

### `rewrite`

Enable or disable the usage of [`postcss-url`]( to correct any URL references within the CSS. The value of `rewrite` will be passed to `postcss-url` to allow for configuration of the plugin.

// On by default, so this will have rewritten url() references
new Processor();
// A falsey value will disable the usage of postcss-url, url() references will not be changed
new Processor({ rewrite : false });
// Configure postcss-url
new Processor({
rewrite : {
url : "inline"

### `map`

Enable source map generation. Can also be passed to `.output()`.

0 comments on commit 9bae543

Please sign in to comment.