Skip to content

Commit 4442790

Browse files
committed
Merge pull request webpack-contrib#27 from filipesilva/patch-1
Add attrs=false to README.md
2 parents 6f7ce35 + 63edae1 commit 4442790

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ By default every local `<img src="image.png">` is required (`require("./image.pn
66

77
You can specify which tag-attribute combination should be processed by this loader via the query parameter `attrs`. Pass an array or a space-separated list of `<tag>:<attribute>` combinations. (Default: `attrs=img:src`)
88

9+
To completely disable tag-attribute processing (for instance, if you're handling image loading on the client side) you can pass in `attrs=false`.
10+
911
## Usage
1012

1113
[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)
@@ -42,6 +44,9 @@ require("html?attrs=img:src img:data-src!./file.html");
4244
require("html?attrs[]=img:src&attrs[]=img:data-src!./file.html");
4345
// => '<img src="http://cdn.example.com/49e...ba9f/a9f...92ca.jpg" data-src="data:image/png;base64,..." >'
4446

47+
require("html?-attrs!./file.html");
48+
// => '<img src="image.jpg" data-src="image2x.png" >'
49+
4550
/// minimized by running `webpack --optimize-minimize`
4651
// => '<img src=http://cdn.example.com/49e...ba9f/a9f...92ca.jpg data-src=data:image/png;base64,...>'
4752

0 commit comments

Comments
 (0)