mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
Update
This commit is contained in:
1 parent
4c18afaeae
commit
785e73d6c0
19 files changed
+3808
-4748
No files matched your search
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Expo config plugin that ensures hoisted native packages are moved back
|
||||
* to apps/mobile/node_modules BEFORE any other plugins try to resolve them.
|
||||
*
|
||||
* This runs at plugin load time (synchronously), not as a deferred mod,
|
||||
* so it fixes the issue before @react-native-firebase/app plugin resolution.
|
||||
*/
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const ROOT = path.resolve(__dirname, '..', '..', '..'); // apps/mobile/../../..
|
||||
const MOBILE_NM = path.join(ROOT, 'apps', 'mobile', 'node_modules');
|
||||
const ROOT_NM = path.join(ROOT, 'node_modules');
|
||||
|
||||
const PACKAGES_TO_FIX = [
|
||||
'@react-native-firebase/app',
|
||||
'@react-native-firebase/analytics',
|
||||
'@react-native-firebase/crashlytics',
|
||||
'@shopify/react-native-skia',
|
||||
];
|
||||
|
||||
for (const pkg of PACKAGES_TO_FIX) {
|
||||
const rootPkg = path.join(ROOT_NM, pkg);
|
||||
const localPkg = path.join(MOBILE_NM, pkg);
|
||||
|
||||
if (!fs.existsSync(rootPkg)) continue;
|
||||
if (fs.existsSync(localPkg)) continue;
|
||||
|
||||
const localParent = path.dirname(localPkg);
|
||||
fs.mkdirSync(localParent, { recursive: true });
|
||||
fs.renameSync(rootPkg, localPkg);
|
||||
}
|
||||
|
||||
module.exports = function withFixHoisting(config) {
|
||||
return config;
|
||||
};
|
||||
Reference in new issue
Block a user