|
1 |
| -# style loader for webpack |
| 1 | +[![npm][npm]][npm-url] |
| 2 | +[![node][node]][node-url] |
| 3 | +[![deps][deps]][deps-url] |
| 4 | +[![chat][chat]][chat-url] |
| 5 | + |
| 6 | +<div align="center"> |
| 7 | + <a href="https://github.com/webpack/webpack"> |
| 8 | + <img width="200" height="200" |
| 9 | + src="https://webpack.js.org/assets/icon-square-big.svg"> |
| 10 | + </a> |
| 11 | + <h1>Style Loader</h1> |
| 12 | +</div> |
2 | 13 |
|
3 | 14 | Adds CSS to the DOM by injecting a `<style>` tag
|
4 | 15 |
|
5 |
| -## Install |
| 16 | +<h2 align="center">Install</h2> |
6 | 17 |
|
7 | 18 | ```
|
8 | 19 | npm install style-loader --save-dev
|
9 | 20 | ```
|
10 | 21 |
|
11 |
| -## Usage |
| 22 | +<h2 align="center">Usage</h2> |
12 | 23 |
|
13 | 24 | [Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)
|
14 | 25 |
|
@@ -61,7 +72,7 @@ By default, the style-loader appends `<style>` elements to the end of the `<head
|
61 | 72 |
|
62 | 73 | If defined, the style-loader will re-use a single `<style>` element, instead of adding/removing individual elements for each required module. **Note:** this option is on by default in IE9, which has strict limitations on the number of style tags allowed on a page. You can enable or disable it with the singleton query parameter (`?singleton` or `?-singleton`).
|
63 | 74 |
|
64 |
| -## Recommended configuration |
| 75 | +### Recommended configuration |
65 | 76 |
|
66 | 77 | By convention the reference-counted API should be bound to `.useable.css` and the simple API to `.css` (similar to other file types, i.e. `.useable.less` and `.less`).
|
67 | 78 |
|
@@ -97,6 +108,44 @@ So the recommended configuration for webpack is:
|
97 | 108 |
|
98 | 109 | **Note** about source maps support and assets referenced with `url`: when style loader is used with ?sourceMap option, the CSS modules will be generated as `Blob`s, so relative paths don't work (they would be relative to `chrome:blob` or `chrome:devtools`). In order for assets to maintain correct paths setting `output.publicPath` property of webpack configuration must be set, so that absolute paths are generated.
|
99 | 110 |
|
100 |
| -## License |
| 111 | +<h2 align="center">Contributing</h2> |
101 | 112 |
|
102 |
| -MIT (http://www.opensource.org/licenses/mit-license.php) |
| 113 | +Don't hesitate to create a pull request. Every contribution is appreciated. In development you can start the tests by calling `npm test`. |
| 114 | + |
| 115 | +<h2 align="center">Maintainers</h2> |
| 116 | + |
| 117 | +<table> |
| 118 | + <tbody> |
| 119 | + <tr> |
| 120 | + <td align="center"> |
| 121 | + <img width="150 height="150" |
| 122 | + src="https://avatars.githubusercontent.com/sokra?v=3"> |
| 123 | + <br /> |
| 124 | + <a href="https://github.com/">Tobias Koppers</a> |
| 125 | + </td> |
| 126 | + <td align="center"> |
| 127 | + <img width="150 height="150" |
| 128 | + src="https://avatars.githubusercontent.com/SpaceK33z?v=3"> |
| 129 | + <br /> |
| 130 | + <a href="https://github.com/">Kees Kluskens</a> |
| 131 | + </td> |
| 132 | + <tr> |
| 133 | + <tbody> |
| 134 | +</table> |
| 135 | + |
| 136 | + |
| 137 | +<h2 align="center">LICENSE</h2> |
| 138 | + |
| 139 | +#### [MIT](./LICENSE) |
| 140 | + |
| 141 | +[npm]: https://img.shields.io/npm/v/style-loader.svg |
| 142 | +[npm-url]: https://npmjs.com/package/style-loader |
| 143 | + |
| 144 | +[node]: https://img.shields.io/node/v/style-loader.svg |
| 145 | +[node-url]: https://nodejs.org |
| 146 | + |
| 147 | +[deps]: https://david-dm.org/webpack/style-loader.svg |
| 148 | +[deps-url]: https://david-dm.org/webpack/file-loader |
| 149 | + |
| 150 | +[chat]: https://badges.gitter.im/webpack/webpack.svg |
| 151 | +[chat-url]: https://gitter.im/webpack/webpack |
0 commit comments