react-native-unity icon indicating copy to clipboard operation
react-native-unity copied to clipboard

Expo Config Plugin fix - use app.plugin.js to fix Typescript issues

Open Jpoliachik opened this issue 1 year ago • 3 comments

  1. Need to modify package.json files list so "app.plugin.js", gets shipped as part of the npm package

  2. 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

  3. I also added a style prop to UnityView which 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.

Jpoliachik avatar Jul 11 '24 14:07 Jpoliachik

@azesmway checking in on this PR - have you been able to look over it? Let me know if you have any questions or concerns

Jpoliachik avatar Jul 31 '24 18:07 Jpoliachik

Any progress on this?

eleddie avatar Nov 15 '24 10:11 eleddie

Nice work buddy.

deanbear avatar Aug 12 '25 06:08 deanbear