Replies: 1 comment 12 replies
-
What's the benefit of using module federation if you need to install something through npm? |
Beta Was this translation helpful? Give feedback.
12 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @ScriptedAlchemy @2heal1 @zhoushaw
If we have
@types/**
packages fornpm
packages, so why don't we have@mf-types/**
packages formodule federation
modules?I think it would be great, if any developer could publish declaration files for his microfrontend
(see how @types works)
Why
For example: what if google could share google-maps-services-js as module federation module instead of npm library
Let's call it
Components as a Service
So developers could plug it this way:
$ npm i -D @mf-types/googlemaps__google-maps-services-js
How
https://npmjs.com/org/@mf-types
)@mf-types/**
loadRemote(...)
should detect types automatically for every new@mf-types/**
installed packageFuture
In future browsers could implement support for such syntax (just like type="importmap")
So we could use
import
withoutloadRemote
So developer just has to install
@mf-types/**
package to have type hints.Beta Was this translation helpful? Give feedback.
All reactions