Thanks for the reply. The idea is to add alias to webpack configs.
Example:
// webpack.config.js
module.exports = {
// ...the rest of your config
resolve: {
alias: {
'react-native$': 'react-native-web'
}
}
}
The above example is oversimplification though. In my code, I would ideally need to have a function that takes the existing webpack config as input and returns a new one. In that case this would be my exact code:
const { resolve } = require("path");
const { withUnimodules } = require("@expo/webpack-config/addons");
module.exports = ({ config }) => {
return withUnimodules(config, { projectRoot: resolve(__dirname, "../") });
};
So like I mentioned in my original post, the solution suggested by you here would be ideal. But it seems that API is now outdated?