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

Question for the HRM issue. #3289

Closed
5 tasks done
jwq403926021 opened this issue Nov 28, 2024 · 3 comments
Closed
5 tasks done

Question for the HRM issue. #3289

jwq403926021 opened this issue Nov 28, 2024 · 3 comments

Comments

@jwq403926021
Copy link

jwq403926021 commented Nov 28, 2024

Describe the bug

When I use mf-manifest.json as the remote entry, startup the project.

  1. Open the http://localhost:4000/order page from host.
  2. Go to modify the common/src/store/userStore.ts file from common projects.
  3. It will trigger a reload for the host app with the latest modification. Then an error occurred on the http://localhost:4000/order page from the host.

Snapshot for error:

image
image

Do you have any idea about it?
Below repository is a reproduction

Reproduction

https://github.com/jwq403926021/webapck-react-ts-federation/tree/mf-manifest

Used Package Manager

pnpm

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 12th Gen Intel(R) Core(TM) i5-1240P
    Memory: 2.40 GB / 15.68 GB
  Binaries:
    Node: 18.20.4 - C:\Program Files\nodejs\node.EXE
    npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.14.2 - C:\Program Files\nodejs\pnpm.CMD
  Browsers:
    Edge: Chromium (130.0.2849.56)
    Internet Explorer: 11.0.22621.3527

Validations

@jwq403926021
Copy link
Author

jwq403926021 commented Nov 28, 2024

BTW: Could you pls explain this "Just like NPM Packages, Module Federation products also generate types and enjoy type hot reloading, although the products are hosted on a remote CDN."
What do the products hosted on a remote CDN mean?

I'm trying to use the feature of "type hot reloading". so far it's not working.

@jwq403926021
Copy link
Author

@ScriptedAlchemy
After I set NODE_ENV=development as the env variable. Both type hot reload issue and HRM issue has been fixed.
I would suggest you to add this mandatory condition into the doc.

@ScriptedAlchemy
Copy link
Member

Send pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants