mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-25 07:34:45 +00:00
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:
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,
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user