mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
mobile: fix module resolution
This commit is contained in:
@@ -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: {
|
||||
|
||||
10
packages/common/package-lock.json
generated
10
packages/common/package-lock.json
generated
@@ -8,10 +8,12 @@
|
||||
"name": "@notesnook/common",
|
||||
"version": "1.0.0",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"timeago.js": "4.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "17.0.2",
|
||||
"react": "17.0.2",
|
||||
"timeago.js": "4.0.2",
|
||||
"typescript": "^4.8.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
@@ -84,8 +86,7 @@
|
||||
"node_modules/timeago.js": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/timeago.js/-/timeago.js-4.0.2.tgz",
|
||||
"integrity": "sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w==",
|
||||
"dev": true
|
||||
"integrity": "sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w=="
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.9.5",
|
||||
@@ -158,8 +159,7 @@
|
||||
"timeago.js": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/timeago.js/-/timeago.js-4.0.2.tgz",
|
||||
"integrity": "sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w==",
|
||||
"dev": true
|
||||
"integrity": "sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w=="
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.9.5",
|
||||
|
||||
Reference in New Issue
Block a user