callstack / callstack/react-native-paper
Disable material community icons example
- Dominant language
- TypeScript
- Stars
- 14.5k
- Forks
- 2.2k
- Avg merge
- 5d 23h
- Merged PRs (30d)
- 12
Description
### Ask your Question
I know that docs point to this option, but it's not clear how it's used. Could you please provide a sample code?
i tryed this in babel.config.js
```
plugins: ['optional-require']
plugins: [
['optional-require', {blacklist: ['react-native-vector-icons']}]
]
plugins: [
['optional-require', {whitelist: ['react-native-vector-icons']}]
]
```
I can't see any difference, when i compile for Android i don't ever need to put that, and when i compile for web i get this
```
Module not found: Error: Can't resolve 'react-native-vector-icons/MaterialCommunityIcons' in 'C:\Users\javie\projects\alten\projects\CCMA\cat3Info\node_modules\react-native-paper\lib\module\components'
@ ./node_modules/react-native-paper/lib/module/core/PaperProvider.js 6:0-72 73:12-33
@ ./node_modules/react-native-paper/lib/module/index.js 4:0-59 4:0-59 5:0-64 5:0-64
@ ./src/App.tsx 1:503-532
@ ./index.web.js 1:240-260
```
Thanks
Contributor guide
Research direction
Start with the option described in the documentation and the babel.config.js examples in the issue, then trace the web build error from react-native-vector-icons/MaterialCommunityIcons through react-native-paper. Done means the documentation includes a working sample that explains the whitelist and blacklist behavior and addresses the reported web compilation failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- documentation, frontend, web-dev
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- Half a day
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100