Skip to content
This repository was archived by the owner on Oct 9, 2020. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Simply add configuration object to `module.loaders` like this.
```javascript
{
test: /\.svg$/,
loader: 'svg-inline'
loader: 'svg-inline-loader'
}
```

Expand Down Expand Up @@ -86,21 +86,21 @@ default: `idPrefix: false`

```js
// Using default hashed prefix (__[hash:base64:7]__)
var logoTwo = require('svg-inline?classPrefix!./logo_two.svg');
var logoTwo = require('svg-inline-loader?classPrefix!./logo_two.svg');

// Using custom string
var logoOne = require('svg-inline?classPrefix=my-prefix-!./logo_one.svg');
var logoOne = require('svg-inline-loader?classPrefix=my-prefix-!./logo_one.svg');

// Using custom string and hash
var logoThree = require('svg-inline?classPrefix=__prefix-[sha512:hash:hex:5]__!./logo_three.svg');
var logoThree = require('svg-inline-loader?classPrefix=__prefix-[sha512:hash:hex:5]__!./logo_three.svg');
```
See [loader-utils](https://github.com/webpack/loader-utils#interpolatename) for hash options.

Preferred usage is via a `module.loaders`:
```js
{
test: /\.svg$/,
loader: 'svg-inline?classPrefix'
loader: 'svg-inline-loader?classPrefix'
}
```

Expand Down