Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

Commit 530c98c

Browse files
authored
Implement feedback from other loaders
1 parent f0ade52 commit 530c98c

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ npm install --save-dev raw-loader
2424

2525
<h2 align="center">Usage</h2>
2626

27-
Use the loader either via your webpack config or inline.
27+
Use the loader either via your webpack config, CLI or inline.
2828

2929
### Via webpack config (recommended)
3030

@@ -35,7 +35,7 @@ module.exports = {
3535
rules: [
3636
{
3737
test: /\.txt$/,
38-
use: [ 'raw-loader' ]
38+
use: 'raw-loader'
3939
}
4040
]
4141
}
@@ -47,6 +47,17 @@ module.exports = {
4747
import txt from 'file.txt';
4848
```
4949

50+
### CLI
51+
52+
```bash
53+
webpack --module-bind 'txt=raw-loader'
54+
```
55+
56+
**In your application**
57+
```
58+
import txt from 'file.txt';
59+
```
60+
5061
### Inline
5162

5263
**In your application**

0 commit comments

Comments
 (0)