Skip to content

Problem with source map generation #4313

@romain-trotard

Description

@romain-trotard

Describe the bug

Hello :)

Sorry I open it again because my previous issue has been closed and I can't reopen it #4210

Again, thank you for the library 😄

Problem encountered

When trying to debug my application, I have some trouble to debug the module federation because it seems there are missing information in the sourcemaps available in the library. There is no sourcesContent so it tries to resolve the source file with the path which causes some troubles in the dev tools.

Note: In my vite reproduction, all the module federation files leads to the generated index.html

Enregistrement.de.l.ecran.2025-11-14.a.11.46.46.mov

This is due tot the fact there are null values in the sourcesContent:

Image

Possible solutions

I see 2 possible solutions:

  • not generating sourcemaps (remove the configuration of sourcemap in rollup.config.js files)
  • configuring "inlineSources": true in the tsconfig.lib.json files (because the problem is due to the use of @rollup/plugin-typescript)

If you want me to do the change, I am up for it :)

Thanks

Reproduction

https://github.com/romain-trotard/federation-repro

Used Package Manager

yarn

System Info

System:
    OS: macOS 15.7.2
    CPU: (10) arm64 Apple M1 Pro
    Memory: 191.41 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.21.1 - /Users/romain.trotard/.volta/tools/image/node/22.21.1/bin/node
    Yarn: 1.19.0 - /Users/romain.trotard/.volta/tools/image/yarn/1.19.0/bin/yarn
    npm: 10.9.4 - /Users/romain.trotard/.volta/tools/image/node/22.21.1/bin/npm
    pnpm: 10.12.4 - /Users/romain.trotard/.volta/bin/pnpm
  Browsers:
    Chrome: 142.0.7444.60
    Firefox: 144.0.2
    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