one
one copied to clipboard
Package Compatibility
This issue aims to outline all the package compatibility issues with One as One approaches it's stable release.
I will update the issue as I become aware of other packages causing issues.
Expo packages
| Package | Description of Issue | Tested Version(s) | Reproduce Link | Fixed |
|---|---|---|---|---|
| expo-image | When I run yarn dev I get "The JSX syntax extension is not currently enabled" caused by expo using .js files instead of .jsx. |
|||
| expo-blur | When I run yarn dev I get "The JSX syntax extension is not currently enabled" caused by expo using .js files instead of .jsx. |
13.0.2 |
1.1.341 |
|
| expo-asset | #301 | |||
| @lexical/react | #303 |
In theory, we should be able to fix these using One's Vite config deps (see docs). Some messages on One Discord suggest there might be a second layer to this issue.
Misc
| Package | Description of Issue | Tested Version(s) | Reproduce Link | Fixed |
|---|---|---|---|---|
| react-native-reanimated-carousel | "x Build failed in 6.52s, error [vite:json] [plugin vite:json] virtual:rn-internals:react-native/package.json: Failed to parse JSON file." |
expo-blur should work now with the fixes included in 1.1.341 👍
Is there an exposed api that will allow people to get their own package support working without waiting for official support?
I guess that's what the deps config is for.
@lexical/react should work now with 1.1.344
expo-image was causing an issue related to expo-modules-core, but the following vite.config.ts fixed it.
export default {
plugins: [
one(),
tamaguiPlugin(),
],
resolve: {
alias: {
"expo-modules-core": path.resolve(
__dirname,
"node_modules/expo-modules-core/",
),
},
},
} satisfies UserConfig;
@natew should one patch expo-linear-gradient by default? I am doing this to make it work on the web.
deps: {
'expo-linear-gradient': {
'**/*.js': ['flow', 'swc'],
},
},
Yes i think we'd probably want that, likely we need to patch all expo module somehow, I want to set up a better way to do this internally automatically, but for now I'd accept a pr to dePatches doing this.
@natew I can submit a PR for this.
I think a separate issue to keep track of the patched expo modules would be better.
Will the new Metro Mode eliminate all these package compatibility issues?