3 ms·
From 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 work
by guilhermehn 9y ago
From 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...