How to prevent the bundler to include MaterialCommunityIcons.ttf?

38 views Asked by At

I'm building a React Native app that should run on multiple platforms, including web. I'm using React Native Paper for the UI components. When I build the app for the web using Metro bundler, the file MaterialCommunityIcons.ttf gets automatically included in the bundle. The file adds 1.12 Mb in size to the bundle.

I'm not using any of the bundled icons, because they don't work on web (generate the 3000ms timeout exceeded error when loading).

How can I make the bundler not to include this file?

I narrowed the problem down to React Native Paper causing the inclusion of MaterialCommunityIcons.ttf.

0

There are 0 answers