mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-22 02:07:55 +00:00
12feaee1b1
- Remove pezkuwi-sdk-ui from pwap (now at /home/mamostehp/pezkuwi-sdk-ui) - Add scripts/fix-pezkuwi-packages.cjs for @pezkuwi package path fixes - Add postinstall hook to mobile package.json - Update metro.config.cjs documentation - Update backend @pezkuwi/api version to 16.5.11 pezkuwi-sdk-ui is now a standalone repo at: https://github.com/pezkuwichain/pezkuwi-sdk-ui Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
58 lines
1.8 KiB
JavaScript
58 lines
1.8 KiB
JavaScript
// Learn more https://docs.expo.io/guides/customizing-metro
|
|
const { getDefaultConfig } = require('expo/metro-config');
|
|
const path = require('path');
|
|
|
|
/** @type {import('expo/metro-config').MetroConfig} */
|
|
const config = getDefaultConfig(__dirname);
|
|
|
|
// ============================================
|
|
// WORKSPACE CONFIGURATION
|
|
// ============================================
|
|
|
|
const projectRoot = __dirname;
|
|
|
|
// Use default watchFolders (no custom configuration)
|
|
|
|
// ============================================
|
|
// CUSTOM MODULE RESOLUTION
|
|
// ============================================
|
|
// Note: @pezkuwi packages have incorrect main field in npm (cjs/build/cjs/index.js)
|
|
// This is automatically fixed by scripts/fix-pezkuwi-packages.cjs via postinstall hook
|
|
|
|
// ============================================
|
|
// FILE EXTENSIONS
|
|
// ============================================
|
|
|
|
// Extend default extensions instead of replacing them
|
|
config.resolver.sourceExts = [
|
|
...config.resolver.sourceExts,
|
|
'expo.ts',
|
|
'expo.tsx',
|
|
'expo.js',
|
|
'expo.jsx',
|
|
'wasm',
|
|
];
|
|
|
|
// SVG should be handled as source file for react-native-svg transformer
|
|
// Remove svg from assetExts if present, add to sourceExts
|
|
config.resolver.assetExts = config.resolver.assetExts.filter(ext => ext !== 'svg');
|
|
if (!config.resolver.sourceExts.includes('svg')) {
|
|
config.resolver.sourceExts.push('svg');
|
|
}
|
|
|
|
// ============================================
|
|
// NODE POLYFILLS
|
|
// ============================================
|
|
|
|
// Polyfills will be resolved from project's own node_modules
|
|
|
|
// ============================================
|
|
// PACKAGE EXPORTS RESOLUTION
|
|
// ============================================
|
|
|
|
// Disable strict package exports checking for packages like @noble/hashes
|
|
// that don't properly export all their submodules
|
|
config.resolver.unstable_enablePackageExports = false;
|
|
|
|
module.exports = config;
|