You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior:
When used with file-loader@1 it creates HTML like <img src="[object Object]"> from <img src="img/logo.png">.
Expected/desired behavior:
It should insert the path of the file that file-loader created, e.g., <img src="img/logo.a1f96acab.png">.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem along with a gist/jsbin of your webpack configuration.
The returned object from file-loader looks like {default: 'img/logo.a1f96acab.png'} and file-loader@1 switched to es6 default imports so it looks like this issue is similar to the css-loader problem reported in webpack-contrib/file-loader#181.
The text was updated successfully, but these errors were encountered:
The best solution for now is to pin file-loader at v0.11.2. We oversaw that exporting an ES2015 Module in v1.0.0 causes problems with html-loader, css-loader's asset resolving which uses require('path/to/asset') and doesn't work with an ES2015 export yet => require('path/to/asset').default.
how's this closed? in which commit? what's the solution for now?
edit: never mind, I just updated to latest version, and it works, but maybe a good idea to include the commit which closed this one, or something 🙂
jerivas
added a commit
to unplugstudio/mezzanine-boilerplate
that referenced
this issue
Aug 14, 2020
I'm submitting a bug report
Webpack version:
3.4.1
HTML-Loader version:
0.5.0
Please tell us about your environment:
Linux
Current behavior:
When used with file-loader@1 it creates HTML like
<img src="[object Object]">
from<img src="img/logo.png">
.Expected/desired behavior:
It should insert the path of the file that
file-loader
created, e.g.,<img src="img/logo.a1f96acab.png">
.This is the relevant part of the webpack config:
The returned object from file-loader looks like
{default: 'img/logo.a1f96acab.png'}
and file-loader@1 switched to es6 default imports so it looks like this issue is similar to the css-loader problem reported in webpack-contrib/file-loader#181.The text was updated successfully, but these errors were encountered: