Working tree is now the canonical repo. Off-chain play-money + trustless on-chain (FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution, mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
48 lines
1.4 KiB
JavaScript
48 lines
1.4 KiB
JavaScript
// Learn more https://docs.expo.io/guides/customizing-metro
|
|
const { getSentryExpoConfig } = require('@sentry/react-native/metro')
|
|
|
|
/**
|
|
* Metro configuration for React Native
|
|
* https://github.com/facebook/react-native
|
|
*
|
|
* @format
|
|
*/
|
|
const path = require('path')
|
|
const projectRoot = __dirname
|
|
const defaultConfig = getSentryExpoConfig(projectRoot)
|
|
|
|
const extraNodeModules = {
|
|
common: path.resolve(__dirname + '/../common/src'),
|
|
components: path.resolve(__dirname + '/components'),
|
|
lib: path.resolve(__dirname + '/lib'),
|
|
}
|
|
module.exports = {
|
|
...defaultConfig,
|
|
watchFolders: [
|
|
...defaultConfig.watchFolders,
|
|
path.resolve(__dirname + '/../common/src'),
|
|
],
|
|
transformer: {
|
|
...defaultConfig.transformer,
|
|
getTransformOptions: async () => ({
|
|
transform: {
|
|
experimentalImportSupport: false,
|
|
inlineRequires: false,
|
|
},
|
|
}),
|
|
},
|
|
resolver: {
|
|
...defaultConfig.resolver,
|
|
nodeModulesPaths: [path.resolve(projectRoot, 'node_modules')],
|
|
extraNodeModules: new Proxy(extraNodeModules, {
|
|
get: (target, name) =>
|
|
//redirects dependencies referenced from common/ to local node_modules
|
|
name in target
|
|
? target[name]
|
|
: path.join(process.cwd(), `node_modules/${name}`),
|
|
}),
|
|
assetExts: [...defaultConfig.resolver.assetExts, 'cjs'],
|
|
sourceExts: [...defaultConfig.resolver.sourceExts, 'cjs'],
|
|
},
|
|
}
|