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

remoteEntry.mjs not optimized #29742

Open
1 of 4 tasks
gultyayev opened this issue Jan 24, 2025 · 0 comments
Open
1 of 4 tasks

remoteEntry.mjs not optimized #29742

gultyayev opened this issue Jan 24, 2025 · 0 comments
Assignees
Labels
scope: module federation Issues related to module federation support type: bug

Comments

@gultyayev
Copy link

Current Behavior

When you build non-dev builds – remoteEntry.mjs is not minified. Thus, it's ~2x the size it could've been otherwise.

Expected Behavior

It should be minified even if it has .mjs which it has by default.

GitHub Repo

https://github.com/gultyayev/nx-angular-mfe-repro

Steps to Reproduce

  1. Clone repo
  2. npm install
  3. nx run-many -t build
  4. Check the dist/apps/about/remoteEntry.mjs and see that it's not optimized

Nx Report

Node           : 22.13.1
OS             : darwin-arm64
Native Target  : aarch64-macos
npm            : 11.0.0

nx                     : 20.3.3
@nx/js                 : 20.3.3
@nx/jest               : 20.3.3
@nx/eslint             : 20.3.3
@nx/workspace          : 20.3.3
@nx/angular            : 20.3.3
@nx/devkit             : 20.3.3
@nx/eslint-plugin      : 20.3.3
@nx/module-federation  : 20.3.3
@nx/web                : 20.3.3
@nx/webpack            : 20.3.3
typescript             : 5.6.3
---------------------------------------
Community plugins:
angular-eslint : 19.0.2

Failure Logs

Package Manager Version

No response

Operating System

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

Additional Information

If I modify the entry file name (by typecasting to any as it's a hidden interface option) to have .js extension – it is minified. So, it seems to be not picked up by the optimizers due to its extension only.

@FrozenPandaz FrozenPandaz added the scope: module federation Issues related to module federation support label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: module federation Issues related to module federation support type: bug
Projects
None yet
Development

No branches or pull requests

3 participants