Files
self/app/metro.config.cjs
Justin Hernandez 86656fdca6 Fix lazy loading, web build; revert tree shaking for now (#815)
* Revert "fix yarn web (#814)"

This reverts commit bf158fd977.

* Revert "add hermes ios engine"

This reverts commit f6defcfb12.

* Revert "codex feedback"

This reverts commit df35a47f72.

* Revert "merge with dev"

This reverts commit 47a8d9d2f1.

* Revert "update Gemfile.lock and remove lock when reinstalling"

This reverts commit 5f25752f77.

* Revert "test package update"

This reverts commit 19dcba0e42.

* Revert "revert install cmd changes"

This reverts commit 5427bd12a1.

* Revert "Fix CI build by excluding nokogiri in GitHub Actions/Act environments"

This reverts commit dbff69a13e.

* Revert "prettier"

This reverts commit 87f421456f.

* Revert "fix building"

This reverts commit fbbefd2a3d.

* Revert "optimize path resolving"

This reverts commit 23b1118b8e.

* Revert "fix loading"

This reverts commit f0c884b43b.

* Revert "clean up dupe bundle install"

This reverts commit 5428567bbe.

* Revert "fix metro loading"

This reverts commit 3a766001dc.

* Revert "remove passport provider lazy loading"

This reverts commit 5f793a54b3.

* Revert "allow cursor to edit Gemfile and update lock file"

This reverts commit b6f7158e8e.

* Revert "Update Gemfile.lock to exclude nokogiri in CI environments"

This reverts commit 243640152d.

* Revert "fix install commands"

This reverts commit 2dc7d7c1c9.

* Revert "fix imports and test"

This reverts commit 83d6308029.

* Revert "fix import"

This reverts commit fa42b07ce4.

* Revert "update build checks"

This reverts commit b281f15a16.

* Revert "save updated imports"

This reverts commit 215bca4bee.

* Revert "fix build command"

This reverts commit 37f95bc8fb.

* Revert "build dependencies before linting"

This reverts commit 9e57e017ca.

* Revert "lint suggestions"

This reverts commit ff9b9d2c7c.

* Revert "fix type. more opportunities"

This reverts commit 7ad82d5817.

* Revert "add typing to crypto loader"

This reverts commit d55eec8f44.

* Revert "yarn nice"

This reverts commit df1c2dbd9b.

* Revert "update lock"

This reverts commit 04692ba3b5.

* Revert "cm feedback"

This reverts commit 848071f315.

* fix file name

* fix web loading

* fix border width styling

* fix package commands

* fix import and update lock

* fixes from reverted commits

* more fixes for web building

* fix yarn web:build

* add yarn web:build workflow

* cm feedback

* final fixes

* fix for and vitge

* fix loading
2025-07-30 22:27:49 -07:00

49 lines
1.5 KiB
JavaScript

const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
const path = require('node:path');
const defaultConfig = getDefaultConfig(__dirname);
const { assetExts, sourceExts } = defaultConfig.resolver;
const monorepoRoot = path.resolve(__dirname, '../');
const commonPath = path.join(__dirname, '/../common');
const trueMonorepoNodeModules = path.resolve(__dirname, '../node_modules');
const extraNodeModules = {
stream: require.resolve('stream-browserify'),
buffer: require.resolve('buffer'),
util: require.resolve('util'),
assert: require.resolve('assert'),
'@babel/runtime': path.join(trueMonorepoNodeModules, '@babel/runtime'),
};
const watchFolders = [
path.resolve(commonPath),
trueMonorepoNodeModules,
path.join(__dirname, 'src'),
];
/**
* Metro configuration
* https://facebook.github.io/metro/docs/configuration
*
* @type {import('metro-config').MetroConfig}
*/
const config = {
transformer: {
babelTransformerPath: require.resolve(
'react-native-svg-transformer/react-native',
),
},
resolver: {
extraNodeModules,
nodeModulesPaths: [
path.resolve(__dirname, 'node_modules'), // App's own node_modules
path.resolve(monorepoRoot, 'node_modules'), // Monorepo root node_modules
trueMonorepoNodeModules,
// Add paths to other package workspaces if needed
],
assetExts: assetExts.filter(ext => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg'],
},
watchFolders,
};
module.exports = mergeConfig(defaultConfig, config);