mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-20 09:23:37 +02:00
- Add uload project with apps/web structure
- Reorganize from flat to monorepo structure
- Remove PocketBase binary and local data
- Update to pnpm and @uload/web namespace
- Add picture project to monorepo
- Remove embedded git repository
- Unify all package names to @{project}/{app} schema:
- @maerchenzauber/* (was @storyteller/*)
- @manacore/* (was manacore-*, manacore)
- @manadeck/* (was web, backend, manadeck)
- @memoro/* (was memoro-web, landing, memoro)
- @picture/* (already unified)
- @uload/web
- Add convenient dev scripts for all apps:
- pnpm dev:{project}:web
- pnpm dev:{project}:landing
- pnpm dev:{project}:mobile
- pnpm dev:{project}:backend
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
67 lines
2 KiB
JavaScript
67 lines
2 KiB
JavaScript
// Learn more https://docs.expo.io/guides/customizing-metro
|
|
const { getDefaultConfig } = require('expo/metro-config');
|
|
const { withNativeWind } = require('nativewind/metro');
|
|
const path = require('path');
|
|
|
|
// Get the project and workspace root directories
|
|
const projectRoot = __dirname;
|
|
const workspaceRoot = path.resolve(projectRoot, '../..');
|
|
|
|
/** @type {import('expo/metro-config').MetroConfig} */
|
|
const config = getDefaultConfig(projectRoot);
|
|
|
|
// Watch all files within the monorepo
|
|
config.watchFolders = [workspaceRoot];
|
|
|
|
// Let Metro know where to resolve packages and in what order
|
|
config.resolver.nodeModulesPaths = [
|
|
path.resolve(projectRoot, 'node_modules'),
|
|
path.resolve(workspaceRoot, 'node_modules'),
|
|
];
|
|
|
|
// Fix for Supabase web compatibility
|
|
config.resolver = {
|
|
...config.resolver,
|
|
nodeModulesPaths: [
|
|
path.resolve(projectRoot, 'node_modules'),
|
|
path.resolve(workspaceRoot, 'node_modules'),
|
|
],
|
|
unstable_enablePackageExports: true,
|
|
unstable_conditionNames: ['browser', 'require', 'import'],
|
|
sourceExts: [...config.resolver.sourceExts, 'cjs', 'mjs'],
|
|
resolveRequest: (context, moduleName, platform) => {
|
|
// Handle @supabase/node-fetch for web platform
|
|
if (platform === 'web' && moduleName === '@supabase/node-fetch') {
|
|
// Return an empty module for web
|
|
return {
|
|
filePath: __dirname + '/utils/polyfills.web.js',
|
|
type: 'sourceFile',
|
|
};
|
|
}
|
|
|
|
// Default resolution
|
|
return context.resolveRequest(context, moduleName, platform);
|
|
},
|
|
};
|
|
|
|
// Web-specific transformer options
|
|
config.transformer = {
|
|
...config.transformer,
|
|
minifierPath: require.resolve('metro-minify-terser'),
|
|
minifierConfig: {
|
|
keep_fnames: true,
|
|
mangle: {
|
|
keep_fnames: true,
|
|
},
|
|
},
|
|
getTransformOptions: async () => ({
|
|
transform: {
|
|
experimentalImportSupport: false,
|
|
inlineRequires: true,
|
|
},
|
|
}),
|
|
// Ensure we transform files from the shared package
|
|
unstable_allowRequireContext: true,
|
|
};
|
|
|
|
module.exports = withNativeWind(config, { input: './global.css' });
|