Closed Pagebakers closed 6 years ago
That's awesome!
@ptmt
So the trick to run this as a plugin is to remove all duplicate js code and namespace all js files with specifics changes for macos with .macos.js
After that you can add this to your rn-cli.config.js and run multiple platforms without any hacks.
module.exports = {
getProvidesModuleNodeModules: () => {
return ['react-native', 'react-native-macos', 'react-native-windows']
},
getPlatforms: () => {
return ['ios', 'android', 'macos', 'windows']
},
};
I've got this partly working locally, but it needs quite a bit more work to make it releasable I'm afraid.
Once we get more help to keep this repo up to date and get all tests running we might be able to add 'react-native-macos' to the default settings in react-native, just like windows.
Added RNPM plugin configuration.
Instead of running react-native-macos-cli you can now just run react-native-cli like:
This still needs adjustments .babelrc config and rn-cli-config to resolve the libraries correctly though. If somebody know hows to solve this using the plugin please let me know :)