Open WillyRamirez opened 2 years ago
I've got this working on react-native-web, you'll need to add this module to your babel config so that it's compiled, otherwise you'll see the errors above. E.g:
const babelLoaderConfiguration = {
test: /\.js$/,
// Add every directory that needs to be compiled by Babel during the build.
include: [
path.resolve(appDirectory, 'index.web.js'),
path.resolve(appDirectory, 'src'),
path.resolve(appDirectory, 'node_modules/react-native-keyboard-aware-scroll-view') // <-- this bit here
],
use: {
loader: 'babel-loader',
options: {
cacheDirectory: true,
// The 'metro-react-native-babel-preset' preset is recommended to match React Native's packager
presets: ['module:metro-react-native-babel-preset'],
// Re-write paths to import only the modules needed by the app
plugins: ['react-native-web']
}
}
}
See here for more info: https://necolas.github.io/react-native-web/docs/multi-platform/#compiling-and-bundling
I get a compile error running react-native-web. It's probably because of the relative import. Has anyone encountered this or know a fix?
package.json