Skip to content

Commit 73ad568

Browse files
authored
Merge pull request #54 from nuragic/nuragic-readme
Update README.md, advanced options section
2 parents a37ef32 + bdde512 commit 73ad568

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ With this configuration:
1818

1919
``` javascript
2020
{
21-
module: { loaders: [
22-
{ test: /\.jpg$/, loader: "file-loader" },
23-
{ test: /\.png$/, loader: "url-loader?mimetype=image/png" }
24-
]},
25-
output: {
26-
publicPath: "http://cdn.example.com/[hash]/"
27-
}
21+
module: { loaders: [
22+
{ test: /\.jpg$/, loader: "file-loader" },
23+
{ test: /\.png$/, loader: "url-loader?mimetype=image/png" }
24+
]},
25+
output: {
26+
publicPath: "http://cdn.example.com/[hash]/"
27+
}
2828
}
2929
```
3030

@@ -92,6 +92,8 @@ require("html?interpolate!./file.html");
9292
If you need to pass [more advanced options](https://github.com/webpack/html-loader/pull/46), especially those which cannot be stringified, you can also define an `htmlLoader`-property on your `webpack.config.js`:
9393

9494
``` javascript
95+
var path = require('path');
96+
...
9597
module.exports = {
9698
...
9799
module: {
@@ -103,7 +105,9 @@ module.exports = {
103105
]
104106
}
105107
htmlLoader: {
106-
ignoreCustomFragments: [/\{\{.*?}}/]
108+
ignoreCustomFragments: [/\{\{.*?}}/],
109+
root: path.resolve(__dirname, 'assets'),
110+
attrs: ['img:src', 'link:href']
107111
}
108112
};
109113
```

0 commit comments

Comments
 (0)