Question
Hey, guys. I'm trying to document my React-Native project using Docz. Thing is my project is using Native-Base.
Description When I try to build, I keep getting this error:
./node_modules/native-base-shoutem-theme/src/StyleProvider.js 10:19
Module parse failed: Unexpected token (10:19)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| */
| export default class StyleProvider extends React.Component {
> static propTypes = {
| children: PropTypes.element.isRequired,
| style: PropTypes.object,
This is my doczrc.js file:
import { reactNative } from 'docz-plugin-react-native';
export default {
title: 'Recarga Styleguide',
plugins: [reactNative()],
native: true,
src: './app/components/ui/' // <== where the components are located inside the project
};
I've been researching and it seems to be quite a common error with Native-Base. I found this solution in stackoverflow: [Expo for Web failed to compile because of native base module for Web failed to compile because of native base module)
I suspect this solution might work for me, thing is: I don't think my project is using expo. I think I would like to try some setting on my babel.config or metro.config file, but I'm not sure how it would work.
Could you help me? Thanks!