Revision 5506e62ccc47e84a21c95ecb3bb5a551f3aed9d2 authored by Suraj Ahmed on 11 October 2022, 12:04:11 UTC, committed by Suraj Ahmed on 11 October 2022, 12:04:11 UTC
1 parent f5a6de7
webpack.config.js
const path = require('path');
const createExpoWebpackConfigAsync = require('@expo/webpack-config');
const { resolver } = require('./metro.config');
const root = path.resolve(__dirname, '..');
const node_modules = path.join(__dirname, 'node_modules');
module.exports = async function(env, argv) {
const config = await createExpoWebpackConfigAsync(env, argv);
config.module.rules.push({
test: /\.(js|ts|tsx)$/,
include: path.resolve(root, 'src'),
use: 'babel-loader',
});
// We need to make sure that only one version is loaded for peerDependencies
// So we alias them to the versions in example's node_modules
Object.assign(config.resolve.alias, {
...resolver.extraNodeModules,
'react-native-web': path.join(node_modules, 'react-native-web'),
});
return config;
};
Computing file changes ...