example: Hotreloading Type Declerations
Repo example for #112 Docs here https://module-federation.io/configure/dts.html
Expected a the host to generate a @mf-types/ as described in here https://module-federation.io/guide/basic/type-prompt.html
The @module-federation/enhanced is doing
if (options.dts !== false) {
new DtsPlugin(options).apply(compiler);
}
so I think we need to do the same
We can't use new DtsPlugin(options).apply(compiler); because from my understanding apply needs a Webpack compiler.
@ScriptedAlchemy is it correct?
Yes, but the DTS manager itself is agnostic and could be implemented in other bundlers.
My colleague is on leave this week, but he understands the DTS system best. It's quite intricate, but there's a DTS manager that should create a separate server for handling type requests and builds. We can also register dynamic remote types from the browser by sending the data back to the DTS server, which then generates the discovered types. It shouldn't be tightly coupled to any bundler, but it still has a few moving parts.
My colleague is on leave this week, but he understands the DTS system best. It's quite intricate, but there's a DTS manager that should create a separate server for handling type requests and builds. We can also register dynamic remote types from the browser by sending the data back to the DTS server, which then generates the discovered types. It shouldn't be tightly coupled to any bundler, but it still has a few moving parts.
I'm creating a "generic compiler" that is implementing all the methods needed :wink:
Perfect. You can send a pr back to core if additional changes or packages need to be created for dts to support other tools
Hello does closing this branch mean that the vite tool wont be getting remote type hints?
Hello does closing this branch mean that the vite tool wont be getting remote type hints?
Nope, I really would like to support this feature but I need an help from the official mf team. You can drop a PR for this if you like, I'm more than happy to collaborate. Thanks