Chrome Extension URL loader for webpack.
This loader links to the file appropriately, using chrome.extension.getURL and also creates the file for you in the specified output dir.
chrome.extension.getURL
Use the loader as you would any other one, specify the test files and options:
{ loader: require.resolve('chrome-url-loader'), test: /\.(png|svg|jpe?g|bmp|gif)/i, options: { publicDir: 'build/static/images', baseDir: paths.appSrc } }
/path/to/src
build/static/media