We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
root
1 parent 32a32d7 commit ba0790aCopy full SHA for ba0790a
README.md
@@ -39,6 +39,27 @@ module.exports = {
39
};
40
```
41
42
+### 'Root-relative' urls
43
+
44
+For urls that start with a `/`, the default behavior is to not translate them:
45
+* `url(/image.png)` => `url(/image.png)`
46
47
+If a `root` query parameter is set, however, it will be prepended to the url
48
+and then translated:
49
50
+With a config like:
51
52
+``` javascript
53
+ loaders: [
54
+ { test: /\.css/, loader: "style-loader!css-loader?root=." },
55
+ ...
56
+ ]
57
+```
58
59
+The result is:
60
61
+* `url(/image.png)` => `require("./image.png")`
62
63
## License
64
65
MIT (http://www.opensource.org/licenses/mit-license.php)
0 commit comments