Skip to content

Chrome Extension is not working due to empty moduleInfo #2673

Closed
@benmarch

Description

@benmarch

Describe the bug

I just upgraded my NextJS MFEs to MF 2.0 and everything is working as expected. I installed the Chrome Extension to test out the proxy functionality, but it just shows an icon and "No ModuleInfo Detected".
image

I looked through the source code and found this line in the devtool package that looks for window.__FEDERATION__.moduleInfo:

const [module, setModule] = useState(window.__FEDERATION__?.moduleInfo || {});

I can confirm that it's empty in the browser console:
Screenshot 2024-06-26 at 3 32 46 PM

I can also confirm that it's empty in the nextjs-ssr example app: https://github.com/module-federation/module-federation-examples/tree/master/nextjs-ssr

Just wondering if I'm missing some config to enable it, or if it's a bug.

Reproduction

https://github.com/module-federation/module-federation-examples/tree/master/nextjs-ssr

Used Package Manager

npm

System Info

System:
    OS: macOS 13.6.7
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 530.61 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.19.1 - /usr/local/bin/node
    npm: 10.2.4 - /usr/local/bin/npm
    pnpm: 8.15.2 - /usr/local/bin/pnpm
  Browsers:
    Chrome: 126.0.6478.127
    Safari: 16.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