Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
[C-988] Fix social actions by fixing metro imports (#1875)
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanjeffers authored and sliptype committed Sep 9, 2022
1 parent 3d8dbf9 commit 6530fcb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"build": "rollup -c",
"lint": "eslint --cache src",
"lint:fix": "npm run lint -- --fix",
"postinstall": "rm -rf node_modules/react",
"start": "rollup -c -w",
"typecheck": "tsc --noEmit"
},
Expand Down
9 changes: 8 additions & 1 deletion packages/mobile/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,18 @@ module.exports = (async () => {
resolver: {
assetExts: assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg', 'cjs'],
nodeModulesPaths: [path.resolve(__dirname, 'node_modules')],
extraNodeModules: {
...require('node-libs-react-native'),
// Alias for 'src' to allow for absolute paths
app: path.resolve(__dirname, 'src'),

// The following imports are needed for @audius/common
// and audius-client to compile correctly
'react-redux': resolveModule('react-redux'),
'react-native-svg': resolveModule('react-native-svg'),
'react-native': resolveModule('react-native'),
react: resolveModule('react'),

// Aliases for 'audius-client' to allow for absolute paths
...getClientAliases(),

Expand Down

0 comments on commit 6530fcb

Please sign in to comment.