Skip to content

The resolveRequest flag is not consumed by the metro-core package #4243

@troZee

Description

@troZee

Describe the bug

When resolveRequest flag is passed inside a consumer metro.config.js, this function is not being passed and called inside the metro core package.

Example: config

const config = {
  resolver: {
    useWatchman: false,
    resolveRequest: (context, moduleName, platform) => {
      console.log('[Custom Resolver] Resolving:', moduleName);   // <---- this line is not called 
      return context.resolveRequest(context, moduleName, platform);
    },
  },

Reproduction

https://github.com/module-federation/metro

Used Package Manager

pnpm

System Info

System:
    OS: macOS 15.6.1
    CPU: (14) arm64 Apple M4 Pro
    Memory: 1.32 GB / 48.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.17.0 - /Users/trozee/.nvm/versions/node/v22.17.0/bin/node
    npm: 10.9.2 - /Users/trozee/.nvm/versions/node/v22.17.0/bin/npm
    pnpm: 8.11.0 - /Users/trozee/.nvm/versions/node/v22.17.0/bin/pnpm
    bun: 1.2.19 - /Users/trozee/.bun/bin/bun
    Deno: 2.5.6 - /Users/trozee/.deno/bin/deno
    Watchman: 2025.06.30.00 - /opt/homebrew/bin/watchman
  Browsers:
    Brave Browser: 142.1.84.132
    Chrome: 142.0.7444.176
    Safari: 18.6

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions