rsnext/examples/with-react-native-web/next.config.js
2020-05-18 15:24:37 -04:00

16 lines
389 B
JavaScript

module.exports = {
webpack: (config) => {
config.resolve.alias = {
...(config.resolve.alias || {}),
// Transform all direct `react-native` imports to `react-native-web`
'react-native$': 'react-native-web',
}
config.resolve.extensions = [
'.web.js',
'.web.ts',
'.web.tsx',
...config.resolve.extensions,
]
return config
},
}