Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack Module Federation: Remote build fails with dashes in remote module name #28042

Closed
1 of 4 tasks
belaczek opened this issue Sep 22, 2024 · 5 comments
Closed
1 of 4 tasks
Assignees
Labels
outdated scope: module federation Issues related to module federation support type: bug

Comments

@belaczek
Copy link
Contributor

belaczek commented Sep 22, 2024

Current Behavior

After upgrading to NX 19.8.0, or any other version with updated module federation, builds of all federated remotes with dash in its name started to fail.

Example federation config:

const config: ModuleFederationConfig = {
  name: 'acme-remote',

  library: { type: 'var', name: 'acme_remote' },

  exposes: {
    './Module': './src/remote-entry.ts',
  },
  shared,
};

Seems like the library property is being ignored. And changing the name property is not possible without renaming the whole project, which is not feasible in our case.

Expected Behavior

Build of federated remotes would pass the same way as before the upgrade.

GitHub Repo

https://github.com/belaczek/nx-federation-repro

Steps to Reproduce

  1. Clone https://github.com/belaczek/nx-federation-repro
  2. pnpm install
  3. pnpm nx build acme-remote

Nx Report

Node           : 20.12.1
OS             : darwin-arm64
Native Target  : aarch64-macos
pnpm           : 9.10.0

nx                 : 19.8.0
@nx/js             : 19.8.0
@nx/jest           : 19.8.0
@nx/linter         : 19.8.0
@nx/eslint         : 19.8.0
@nx/workspace      : 19.8.0
@nx/devkit         : 19.8.0
@nx/eslint-plugin  : 19.8.0
@nx/react          : 19.8.0
@nrwl/tao          : 19.8.0
@nx/web            : 19.8.0
@nx/webpack        : 19.8.0
typescript         : 5.5.4

Failure Logs

> nx run acme-remote:build:production

[ Module Federation Manifest Plugin ]: Manifest will use absolute path resolution via its host at runtime, reason: publicPath='auto'

 NX   [ Module Federation Manifest Plugin ]: no files found for remoteEntry chunk

Pass --verbose to see the stacktrace.

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@belaczek belaczek changed the title Webpack Module Federation: Remote build fails when dashes are in remote module name Webpack Module Federation: Remote build fails with dashes in remote module name Sep 22, 2024
@k4wo
Copy link

k4wo commented Sep 25, 2024

I have the same issue. This is happening from a 19.6.3 version

@jaysoo jaysoo added the scope: module federation Issues related to module federation support label Sep 25, 2024
@moinerus
Copy link

moinerus commented Oct 8, 2024

same issue 19.8.3

@k4wo
Copy link

k4wo commented Oct 8, 2024

20.0.0 is still affected

@Coly010
Copy link
Contributor

Coly010 commented Oct 15, 2024

Fixed by: #28401

@Coly010 Coly010 closed this as completed Oct 15, 2024
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: module federation Issues related to module federation support type: bug
Projects
None yet
Development

No branches or pull requests

5 participants