Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Jpoliachik
Copy link
Contributor

@Jpoliachik Jpoliachik commented Jul 11, 2024

  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 Jpoliachik changed the title Expo Config Plugin fix - use app.plugin.js instead of typescript Expo Config Plugin fix - use app.plugin.js to fix Typescript issues Jul 31, 2024
@Jpoliachik
Copy link
Contributor Author

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

@eleddie
Copy link

eleddie commented Nov 15, 2024

Any progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants