Not a great webpack expert, but I'm not sure if you are using this bootloader correctly. The URL downloader is designed to download files that are needed / imported into your code.
So, if at your entry point you write something like:
var imageData = require("path/to/my/file/file.png");
Webpack will see that you are trying to import something other than a .js file, and then you will look in the configured bootloader list to see if it can use any bootloader to load this resource.
Since you created a bootloader with the test attribute that matches your resource type (.png extension), it will use this customized loader (url-loader) to try to load this resource into your package.
You can also tell webpack which bootloader it needs to use by adding the bootloader (and some query strings, if you want) in the desired path:
var imageData = require("url-loader?mimetype=image/png!path/to/my/file/file.png");
Also, I'm not sure if there is even a name parameter that you can pass to url-loader .
source share