mobile: fix module resolution

This commit is contained in:
ammarahm-ed
2023-06-20 12:04:38 +05:00
parent 04d122c47c
commit 2b94212552
2 changed files with 16 additions and 6 deletions

View File

@@ -23,7 +23,17 @@ module.exports = {
"react": path.join(__dirname, "../node_modules/react"),
"react-dom": path.join(__dirname, "../node_modules/react-dom"),
"@notesnook": path.join(__dirname, "../../../packages"),
"@notifee/react-native": path.join(__dirname, "../node_modules/@ammarahmed/notifee-react-native")
"@notifee/react-native": path.join(__dirname, "../node_modules/@ammarahmed/notifee-react-native"),
},
resolveRequest: (context, moduleName, platform) => {
if (moduleName ==='react') {
// Resolve react package from mobile app's node_modules folder always.
return {
filePath: path.resolve(path.join(__dirname, '../node_modules', "react","index.js")),
type: 'sourceFile',
};
}
return context.resolveRequest(context, moduleName, platform);
}
},
transformer: {