expo start:web failed to compile after import native-base

@bycedric solution worked.

  1. run expo install @expo/webpack-config
  2. create ‘webpack.config.js’ file at the root level, add code below
const createExpoWebpackConfigAsync = require('@expo/webpack-config');

module.exports = async function (env, argv) {
    const config = await createExpoWebpackConfigAsync({
        ...env,
        babel: {
            dangerouslyAddModulePathsToTranspile: ['@codler/react-native-keyboard-aware-scroll-view']
        }
    }, argv);
    return config;
};
6 Likes