Importing a module from a CDN or otherwise (micro frontend) #14426
Unanswered
bradydowling
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm looking to import a header component into my app as a micro frontend. I am also considering if this would work for Nuxt but I haven't gotten much info there and our team is likely switching to React/Next. Basically I'm curious if there are any examples of microfrontends within Next in this kind of fashion, consuming remote components at runtime, not build time.
I was originally going import the header via a
script
tag but then I'd likely have to have React stored on the global namespace so I'm not sure if that's the best way to go.I've considered using single-spa and/or SystemJS to pull in this header but I haven't found a way for these things to play nicely with Next. Are there any examples of this?
Lastly, I saw this repo for module federation with Next but I can't find any other mention of that aside from that link so that might require a lot of work.
Is there another way of using a micro frontend within Next that would work or will any of the approaches that I've mentioned work out?
Beta Was this translation helpful? Give feedback.
All reactions