Skip to content

Missing files property in @module-federation/runtime-tools/package.json #3873

Closed
@42tg

Description

@42tg

Describe the bug

Hi,

Today I played around with the Module Federation runtime-tools package. After successfully implementing it, my unit tests started to fail and I got this error:

    cannot process file because it's ignored by .swcrc

After tracking it down a bit further, I found out that Jest seems to respect the dedicated .swcrc even in the node modules (may be a configuration issue, but I don't have access to the configuration on my side).

find . -name ".swcrc*" 2>/dev/null | head -10

./node_modules/@module-federation/runtime-tools/.swcrc
./node_modules/@module-federation/enhanced/node_modules/@module-federation/runtime-tools/.swcrc

Side Note: if I remove those, the unit tests work fine.

So I'm curious - is this on purpose, or is the setup of the Node package not right? I noticed that there is no files property within the package.json.

But I don't want to go down the road of understanding how the package is currently published and why there are differences between the other packages.

So can anybody provide me feedback about this? Thanks

Reproduction

none

Used Package Manager

yarn

System Info

System:
    OS: macOS 15.5
    CPU: (12) arm64 Apple M4 Pro
    Memory: 65.03 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.16.0 - ~/.nvm/versions/node/v22.16.0/bin/node
    Yarn: 4.4.1 - ~/.nvm/versions/node/v22.16.0/bin/yarn
    npm: 10.9.2 - ~/.nvm/versions/node/v22.16.0/bin/npm
  Browsers:
    Chrome: 138.0.7204.50
    Edge: 138.0.3351.55
    Safari: 18.5

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