2019-01-29 13:42:44 +01:00
|
|
|
module.exports = {
|
2020-05-18 21:24:37 +02:00
|
|
|
webpack: (config) => {
|
2018-10-22 22:32:24 +02:00
|
|
|
config.resolve.alias = {
|
2019-01-29 13:42:44 +01:00
|
|
|
...(config.resolve.alias || {}),
|
2019-08-15 08:01:09 +02:00
|
|
|
// Transform all direct `react-native` imports to `react-native-web`
|
2019-11-11 04:24:53 +01:00
|
|
|
'react-native$': 'react-native-web',
|
2018-10-22 22:32:24 +02:00
|
|
|
}
|
2020-03-01 18:32:48 +01:00
|
|
|
config.resolve.extensions = [
|
|
|
|
'.web.js',
|
2021-12-16 06:50:23 +01:00
|
|
|
'.web.jsx',
|
2020-03-01 18:32:48 +01:00
|
|
|
'.web.ts',
|
|
|
|
'.web.tsx',
|
|
|
|
...config.resolve.extensions,
|
|
|
|
]
|
2018-10-22 22:32:24 +02:00
|
|
|
return config
|
2019-11-11 04:24:53 +01:00
|
|
|
},
|
2019-01-29 13:42:44 +01:00
|
|
|
}
|