Skip to content

Commit 2bb351f

Browse files
authored
Merge pull request Jimdo#45 from johnnyreilly/patch-1
Update README.md to contain `-loader` suffixes
2 parents 07ef540 + 5b403fb commit 2bb351f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ export default styles;
2929
A cleaner way is to expose all classes as named exports, this can be done if you enable the `namedExport`-option.
3030
e.g.
3131
```js
32-
{ test: /\.css$/, loader: 'typings-for-css-modules?modules&namedExport' }
32+
{ test: /\.css$/, loader: 'typings-for-css-modules-loader?modules&namedExport' }
3333
```
3434

3535
As mentioned above, this requires classnames to only contain valid typescript characters, thus filtering out all classnames that do not match /^\w+$/i. (feel free to improve that regexp)
3636
In order to make sure that even classnames with non-legal characters are used it is highly recommended to use the `camelCase`-option as well, that - once passed to the css-loader - makes sure all classnames are transformed to valid variables.
3737
with:
3838
```js
39-
{ test: /\.css$/, loader: 'typings-for-css-modules?modules&namedExport&camelCase' }
39+
{ test: /\.css$/, loader: 'typings-for-css-modules-loader?modules&namedExport&camelCase' }
4040
```
4141
using the following css:
4242
```css
@@ -62,7 +62,7 @@ To silence the loader because you get annoyed by its warnings or for other reaso
6262
e.g.:
6363

6464
```js
65-
{ test: /\.css$/, loader: 'typings-for-css-modules?silent' }
65+
{ test: /\.css$/, loader: 'typings-for-css-modules-loader?silent' }
6666
```
6767

6868
### `banner`-option
@@ -88,8 +88,8 @@ webpackConfig.module.loaders: [
8888
after:
8989
```js
9090
webpackConfig.module.loaders: [
91-
{ test: /\.css$/, loader: 'typings-for-css-modules?modules' }
92-
{ test: /\.scss$/, loader: 'typings-for-css-modules?modules&sass' }
91+
{ test: /\.css$/, loader: 'typings-for-css-modules-loader?modules' }
92+
{ test: /\.scss$/, loader: 'typings-for-css-modules-loader?modules&sass' }
9393
];
9494
```
9595

0 commit comments

Comments
 (0)