mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-24 20:20:21 +01:00
* mobile: upgrade to react-native 0.71 * mobile: update to react-native 0.72.0 * mobile: fix release build on android * mobile: fix editor stuck in loading state * mobile: fix bootsplash logo in dark mode * mobile: update patch files * mobile: cleanup * mobile: increase delay * mobile: add logs on upload * mobile: ensure editor is ready before note loading * mobile: fix ui * mobile: fix * ci: update workflow * ci: undo workflow changes --------- Signed-off-by: Ammar Ahmed <40239442+ammarahm-ed@users.noreply.github.com>
44 lines
1.5 KiB
JavaScript
44 lines
1.5 KiB
JavaScript
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
|
|
/**
|
|
* Metro configuration for React Native
|
|
* https://github.com/facebook/react-native
|
|
*
|
|
* @format
|
|
*/
|
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
const path = require('path');
|
|
const nodeModulesPaths = [path.resolve(path.join(__dirname, '../node_modules'))];
|
|
const config = {
|
|
projectRoot: __dirname,
|
|
watchFolders: [
|
|
path.join(__dirname, '../app'),
|
|
path.join(__dirname, '../share'),
|
|
path.join(__dirname, '../node_modules'),
|
|
path.join(__dirname, '../e2e'),
|
|
path.join(__dirname, "../../../packages"),
|
|
]
|
|
};
|
|
const mergedConfig = mergeConfig(getDefaultConfig(__dirname), config);
|
|
|
|
mergedConfig.resolver = {
|
|
sourceExts: ['jsx', 'js', 'ts', 'tsx', 'cjs', "json"],
|
|
nodeModulesPaths,
|
|
extraNodeModules: {
|
|
"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"),
|
|
},
|
|
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);
|
|
}
|
|
};
|
|
|
|
module.exports = mergedConfig; |