react-native-unity
react-native-unity copied to clipboard
Expo Config Plugin fix - use app.plugin.js to fix Typescript issues
-
Need to modify package.json files list so
"app.plugin.js",gets shipped as part of the npm package -
If the plugin was written in typescript, it would need to be transpiled for Node prior to being used. For simplicity, rather than add ts-node as a dependency and build step, I've converted the TS plugin into JS so no transpiling is needed. This is what most of the Expo Config Plugin Examples do
-
I also added a
styleprop toUnityViewwhich fixes a typescript issue
This also fixes a Typescript regression that arose when we added plugins dir to the exported library:
In v 1.0.10 you would need to import UnityView from "@azesmway/react-native-unity/lib/typescript/src" in order to properly import the UnityView types, since the typescript build contained src and plugins. Removing the plugins tsconfig fixes this, so the contents of src are the only thing exported, and a import UnityView from "@azesmway/react-native-unity works as expected.
@azesmway checking in on this PR - have you been able to look over it? Let me know if you have any questions or concerns
Any progress on this?
Nice work buddy.