Commit 1c11ffd1 authored by Brandon Bayer's avatar Brandon Bayer Committed by Tim Neutkens

Fix react-native-web example by adding babel plugin (#9078)

* fix react-native-web example by adding babel plugin

* changes
parent ab0a8647
module.exports = {
presets: ['next/babel'],
plugins: [['react-native-web', { commonjs: true }]]
}
module.exports = {
webpack: config => {
webpack: (config, { defaultLoaders }) => {
config.resolve.alias = {
...(config.resolve.alias || {}),
// Transform all direct `react-native` imports to `react-native-web`
'react-native$': 'react-native-web'
}
config.resolve.extensions.push('.web.js', '.web.ts', '.web.tsx')
return config
}
}
......@@ -10,5 +10,8 @@
"react": "^16.7.0",
"react-dom": "^16.7.0",
"react-native-web": "^0.11.6"
},
"devDependencies": {
"babel-plugin-react-native-web": "^0.11.7"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment