2 ms·
Why file loader and not URL loader? To be fair this question is coming from a guy with a 4 day old stack overflow question that essentially amounts to "how the
by komali2 9y ago
Why file loader and not URL loader?
To be fair this question is coming from a guy with a 4 day old stack overflow question that essentially amounts to "how the fuck do I use URL loader?"
- guilhermehn 9y agoFrom file-loader's README: >Instructs webpack to emit the required object as file and to return its public URL From url-loader's README: >The url-loader works like the file-loader, but can return a DataURL if the file is smaller than a byte limit. They are interchangeable, do the same thing, but url-loader can generate a dataUrl if the file is small, like an png/svg icon, so you can save one request where the latency could be higher than the download time. I think this feature should be built into file-loader and toggled via loader option.
- komali2 9y agoOh, I read the docs start to finish, I just can't get the DataURLs to work lol. You seem like you know what you're talking about, so if you wanna take a crack at it... https://stackoverflow.com/questions/49934116/404s-on-some-images-from-webpack-url-loader https://stackoverflow.com/questions/49934116/404s-on-some-im...