Skip to content

Commit 17d8b12

Browse files
satya164necolas
authored andcommitted
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
1 parent 72e7f46 commit 17d8b12

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/docs/src/pages/docs/getting-started/multi-platform.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ const imageLoaderConfiguration = {
107107
use: {
108108
loader: 'url-loader',
109109
options: {
110-
name: '[name].[ext]'
110+
name: '[name].[ext]',
111+
esModule: false,
111112
}
112113
}
113114
};

0 commit comments

Comments
 (0)