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

NF SourceMap Support #764

Open
2 tasks
rribeiro93k opened this issue Feb 17, 2025 · 1 comment
Open
2 tasks

NF SourceMap Support #764

rribeiro93k opened this issue Feb 17, 2025 · 1 comment
Labels
status:reproducible-stackblitz-requested We require a reproducible stackblitz.

Comments

@rribeiro93k
Copy link

rribeiro93k commented Feb 17, 2025

With what library do you have an issue?

native-federation

Reproduction of the bug/regression with instructions

In my angular project with Native Federation, I can successfully install a library having souceMap (.js.map) files but when I try to run the application by npm start I got some errors from console indicating some interpretation problem:

✘ [ERROR] No loader is configured for ".map" files: node_modules/@some/library/dist/esm/some-component.js.map

    node_modules/@some/library/dist/esm/index-6dd6ff9f.js:3890:2:
      3890 │   `./${bundleId}.entry.js${BUILD.hotModuleReplacement && hmrVersionId ? '?s-hmr=' + hmrVersionId : ''}`).then(importedModule => {

This error appears for each .map file

If i'm not mistaken, mathjs generate dist with sourceMap if someone wants to try this behavior.

For now, to work with this scenario I've created an postinstall script to remove this files:
"postinstall": "rm -Rf $(find node_modules/@some/library/ -name *.js.map) && echo '@some/library: map files removed ✔'"

Expected behavior

Runs application with sourcemap files

Versions of Native/Module Federation, Angular, Node, Browser, and operating system

Native Federation: v18.2.2
Angular: v18.2.0
Node: v20
Operation System: Windows + Wsl2

Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@manfredsteyer
Copy link
Contributor

Can you please provide a minimal reproduction via github?

@manfredsteyer manfredsteyer added the status:reproducible-stackblitz-requested We require a reproducible stackblitz. label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:reproducible-stackblitz-requested We require a reproducible stackblitz.
Projects
None yet
Development

No branches or pull requests

2 participants