-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
TypeError: NX withModuleFederation is not a function #29557
Comments
so it doesn't seem to like this line for this issue on my version of webpack.config.ts module.exports = async (config, context) => { When I copy the code right from the documentation it looks like this for angular as-is I added nothing to it
but nx build ui-host yeilds this
still trying to shake this out reviewing my project.json files if anyone can reproduce this and help I would greatly appreciate Thank you |
can someone explain the back and forth about these statements? const withModuleFederation = require('@nx/module-federation/angular'); // Or @nx/angular/module-federation why does this have be a constant moving target both fail for me ======== webpack.config for apps/ui-auth/webpack.config.ts
this line here import config from './module-federation.config'; gives error which looks like this
whoever is writing all this code can I get some feedback? and some help? I have done MFE's commercially and this shouldn't be happening a tsconfig property? Please |
does not seem to be a tsconfig issue I copied over properties from a newly generated similar mfe scaffold
but the bare bones code copied right from the docs doesn't hold water it yields
I have yet to see a demo or example of custom webpack with Nx mfe solving the thanks for an elite awesome product your help is greatly appreciated |
so now I switch my executor to @nx/webpack:webpack yeilds error below with "isolatedConfig": false, in my project.json but I have a webpack.config.ts
so I add isolatedConfig: false and the build brings me back full circle again using my webpack.config.ts
if nx team could take the time to throw together an mfe/webpack/polyfill demo that demonstrates that the webpack < 5 issue is put to rest I think its warranted given all the examples out there this one has been biting for quite a while everywhere on the web. I find it terrible that somehow I have to retrofit my nx project options into webpack config now (ie. assets and more) |
so I finally realize theres a webpack plugin on the docs was there on previous iterations so I put it back and that brings me back to this issue being created in 1st place Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it. no clue why executor is running off to build my admin app (that speaks) its neither host nor remote but there was a transient webpack.config.ts there I just deleted. no reason for that to even happen. I manually built ui-host. going in circles here with nx and webpack if anyone can prioritize this that would be terrific |
as I recall this could have been influenced by rogue imports with long relative ../../.. that snuck in somehow major code review in progress but overall Im very uncomfortable with this |
One last question why cant they implement it so we can use normal typescript imports who is imposing REQUIRE on front end apps? and this is whats triggering the webpack < 5 wreck? something isn't right here. Its wrong. Victors high velocity masterpiece has been sent into the trench and he should be aware of that. Im taking a break on this waiting for feedback and I am going to hold my breathe |
Current Behavior
Just migrated to 20.3.1
followed the docs on this one at
https://nx.dev/recipes/webpack/webpack-config-setup#configure-webpack-for-module-federation
for angular
build should run clean, it wont
most executors do not support a solution to this
the only one I know of is
"executor": "@nx/angular:webpack-browser",
and it fails consistently
it cannot process the plugins withNx() and all the others supporting expanded webpack config within the MFE build ecosystem particularly withModuleFederation
I am still sadly attempting to overcome the
BREAKING CHANGE: webpack < 5
polyfills impact
by implementing a custom webpack.config.ts
for 2 years the web posts are all moving targets to solve and this remains so
Expected Behavior
build should run clean
I am still sadly attempting to overcome the
BREAKING CHANGE: webpack < 5
polyfills impact
by implementing a custom webpack.config.ts
GitHub Repo
https://github.com/nhhockeyplayer/meanstacknh
Steps to Reproduce
I have a microfront end 1 host and 3 remotes everything combed thru and sync'd up
nx run ui-host:build:development
or
nx build ui-host
Nx Report
Failure Logs
Package Manager Version
npm --version 10.9.0. yarn --version 1.22.22
Operating System
Additional Information
this is the current state of my only webpack.config.ts
I never cared to memorize each and every property of webpack and how they all fall into place
but this setup is not cutting it
I did generate a new scaffold workspace
to see what the new generated files look like and I did spot an anomoly of bridging the remotes
the host beneath apps/host-security/public/module-federation.manifest.json contained the following
no such mf-manifest.json exists is this hidden within some plugin?
I set mine up in my project to contain this
this is something I saw along the way but Im still shaking this out as well as reviewing my httploaders
anyway I would like to know why TypeError: withModuleFederation is not a function
thank you for an elite awesome product
The text was updated successfully, but these errors were encountered: