Skip to content

Commit

Permalink
Fix metro support for @metaplex-foundation/umi (#8123)
Browse files Browse the repository at this point in the history
  • Loading branch information
sliptype authored Apr 16, 2024
1 parent f5fc606 commit a685aab
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/mobile/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ const config = {
splPath
],
resolver: {
unstable_enablePackageExports: true,
assetExts: assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg', 'cjs', 'workerscript'],
extraNodeModules: {
Expand Down Expand Up @@ -108,6 +107,14 @@ const config = {
type: 'sourceFile'
}
}

if (moduleName === '@metaplex-foundation/umi/serializers') {
return {
filePath: `${resolveModule('@metaplex-foundation/umi')}/dist/cjs/serializers.cjs`,
type: 'sourceFile'
}
}

return context.resolveRequest(context, moduleName, platform)
}
},
Expand Down

0 comments on commit a685aab

Please sign in to comment.