-
-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
html-loader get error when processing empty src in img tags #191
Comments
The issue about the xxxHTMLLINKxxx part is resolved in the last version : https://github.com/webpack-contrib/html-loader/releases/tag/v1.0.0-alpha.0, maybe it will also solve your other problem. Use |
Thanks, I've tried the alpha version but get another error:
And this is my configuration:
Then I remove the attrs in option and see another error:
I find this is caused by the inline jQuery. I replace it with a cdn url and I'm happy to find the xxxHTMLLINKxxx problem is solved. But the code Overall, the xxxHTMLLINKxxx problem is solved and please see the three points following. Thanks a lot!
|
Ok, did you try to specify the Something like: {
loader: 'html-loader',
options: {
url(url) {
return url !== '';
}
}
} |
I'm submitting a bug report
Webpack version:
3.4.1
HTML-Loader version:
0.5.5
Please tell us about your environment:
OSX 10.13.6
Current behavior:
Code above provide two cases:
Can't resolve './\"\"'
<img src="xxxHTMLLINKxxx0.57464132184163710.241630956172443xxx">
Expected/desired behavior:
Add the code above in html with a html-loader in webpack.
Both the two cases should be
<img src="">
after processed by html-loaderThis is found when using
jquery-lazyload
. Usually I write animg
tag with adata-original
attribute and sometimes add an emptysrc
, which will result in such a problem. Although it is possible to avoid this by removing the empty source or add a link, I think this should be solved by the loader itself.Browser: all
Language: ES6 & ES5
The text was updated successfully, but these errors were encountered: