Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR attempts to fix the Expo plugin configuration by simplifying the package.json exports structure and improving error handling in the Vosk plugin.
- Removes complex exports field in favor of traditional main/module/types fields
- Changes plugin file path from "plugin" to "plugin/build" in the files array
- Updates plugin code to handle undefined props more robustly
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| plugin/src/withVosk.ts | Improves error handling by using nullish coalescing instead of type assertion |
| package.json | Simplifies package exports, updates version, and changes build configuration |
| "android", | ||
| "ios", | ||
| "plugin", | ||
| "plugin/build", |
There was a problem hiding this comment.
The files array references 'plugin/build' but there's no indication this directory exists or will be created during the build process. This could cause the plugin to be missing from published packages. Verify that the plugin build process creates this directory or change back to 'plugin' to include the source files.
| "plugin/build", | |
| "plugin", |
| "types": "lib/typescript/src/index.d.ts", | ||
| "main": "lib/commonjs/index.js", | ||
| "module": "lib/module/index.js", | ||
| "react-native": "src/index.ts", |
There was a problem hiding this comment.
The react-native field points to 'src/index.ts' but the main source file is 'src/index.tsx' (as seen in the build configuration). This mismatch could cause module resolution issues in React Native projects.
| "react-native": "src/index.ts", | |
| "react-native": "src/index.tsx", |
No description provided.