You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-2
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,6 @@ var css = require("css!./file.css");
13
13
// => returns css code from file.css, resolves imports and url(...)
14
14
```
15
15
16
-
css code will be minimized if specified by the module system.
17
-
18
16
`@import` and `url(...)` are interpreted like `require()` and will be resolved by the css-loader.
19
17
Good loaders for requiring your assets are the [file-loader](https://github.com/webpack/file-loader)
20
18
and the [url-loader](https://github.com/webpack/url-loader) which you should specify in your config (see below).
@@ -60,6 +58,12 @@ The result is:
60
58
61
59
*`url(/image.png)` => `require("./image.png")`
62
60
61
+
### Minification
62
+
63
+
By default the css-loader minimizes the css if specified by the module system.
64
+
65
+
In some cases the structural minification is destructive to the css, so you can disable it with the `disableStructuralMinification` query parameter. `require("css-loader?disableStructuralMinification!./file.css")`
66
+
63
67
## License
64
68
65
69
MIT (http://www.opensource.org/licenses/mit-license.php)
0 commit comments