Update docs example of webpack url-loader

Latest versions of `url-loader` default `esModule: true` which outputs a module
object with `default` property for asset imports. This behaviour is different
from Metro which doesn't do that.

This breaks compatibility with a lot of React Native libraries since it's
common to do an inline `require` for assets., so it'd work for Metro, but break
with url-loader.

Close #2040
This commit is contained in:
Satyajit Sahoo
2021-06-05 05:53:43 +02:00
committed by Nicolas Gallagher
parent 72e7f46ae4
commit 17d8b12299
@@ -107,7 +107,8 @@ const imageLoaderConfiguration = {
use: {
loader: 'url-loader',
options: {
name: '[name].[ext]'
name: '[name].[ext]',
esModule: false,
}
}
};