Open lgxm3z opened 1 year ago
Use custom webpack config https://www.gatsbyjs.com/docs/how-to/custom-configuration/add-custom-webpack-config/
gatsby-node.js
📝exports.onCreateWebpackConfig = ({stage, rules, loaders, plugins, actions}) => {
actions.setWebpackConfig({
resolve: {
alias: {
'react-native$': 'react-native-web'
},
extensions: ['.tsx', '.ts', '.jsx', '.js', '.web.tsx', '.web.ts', '.web.jsx', '.web.js']
}
});
};