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

Using napi library within webpack angular app #73

Open
etkachev opened this issue Jan 14, 2025 · 0 comments
Open

Using napi library within webpack angular app #73

etkachev opened this issue Jan 14, 2025 · 0 comments

Comments

@etkachev
Copy link

I created a rust library (with napi config of monodon). and trying to import a basic function to use within an angular Application that's using webpack mfe. When I try to build the angular app, I get the following error:

TypeError: Cannot read properties of undefined (reading 'data')
at /node_modules/@nx/webpack/src/utils/module-federation/dependencies.js:33:53

Issue seems to be happening on this line

Specifically when the target is cargo:napi. I'm assuming if it's not a npm source, then it's treating it like a workspace library, and expecting data.root to exist (but it doesn't so it fails).

Any way to add support so I can import these libraries into webpack/mfe applications?

Currently using monodon: 2.1.1

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

1 participant