Open livne-via opened 1 year ago
I'am meet this issue too, is anyone for help?
The temporary test case of vite-plugin-federation only supports esm
and systemjs
. It is not clear what will happen when using iife
. I will try it when I have time.
Maybe I can't deal with this problem, because code-spliting is a must for this plugin.
Maybe I can't deal with this problem, because code-spliting is a must for this plugin.
@ruleeeer As a matter of fact, iv׳e also tried with a rollup
iife
plugin, just for a small starter app, and even then - i couldn't produce an cjs chunks with a proper desired var name.
I just wonder if someone here maybe succeeded to load Vite MF, with Webpack as a host, and in a dynamic way ..
As a matter of fact, iv׳e also tried with a
rollup
iife
plugin, just for a small starter app, and even then - i couldn't produce an cjs chunks with a proper desired var name.I just wonder if someone here maybe succeeded to load Vite MF, with Webpack as a host, and in a dynamic way ..
If I remember correctly, rollup
has provided iife
format support. As for federation, I have built a static webpack
as an example of host, but dynamic related examples are currently missing.
As a matter of fact, iv׳e also tried with a
rollup
iife
plugin, just for a small starter app, and even then - i couldn't produce an cjs chunks with a proper desired var name. I just wonder if someone here maybe succeeded to load Vite MF, with Webpack as a host, and in a dynamic way ..If I remember correctly,
rollup
has providediife
format support. As for federation, I have built a staticwebpack
as an example of host, but dynamic related examples are currently missing.
Are there plans to add this example? I am using vite vue3 as remote, angular12(webpack5) as host, dynamic loading has been unsuccessful this is the simple example: vue as remote:https://github.com/huajian123/dpt-vue angular as host:https://github.com/huajian123/ng-test-mf
也许我无法处理这个问题,因为代码拆分是这个插件必须的。
@ruleeeer事实上,iv׳e 还尝试了一个
rollup
iife
插件,只是为了一个小型的入门应用程序,即使那样 - 我也无法生成具有适当所需 var 名称的 cjs 块。我只是想知道这里是否有人可以成功加载 Vite MF,以 Webpack 作为主机,并以动态方式..
May I ask what are you doing to dynamically load now?
As a matter of fact, iv׳e also tried with a
rollup
iife
plugin, just for a small starter app, and even then - i couldn't produce an cjs chunks with a proper desired var name. I just wonder if someone here maybe succeeded to load Vite MF, with Webpack as a host, and in a dynamic way ..If I remember correctly,
rollup
has providediife
format support. As for federation, I have built a staticwebpack
as an example of host, but dynamic related examples are currently missing.
If possible, can you give an example of dynamic loading with webpack as the host and vite as the remote?
Any progress on this? We would like to use it with webpack as host, but it's impossible for now.
Any progress on this? We would like to use it with webpack as host, but it's impossible for now.
up this, have the same issue
up this, have the same issue
any news?
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
any news?
Versions
Reproduction
vite.config.ts
src/test.js
Additional Details
Steps to reproduce
npm run build
What is Expected?
to generate a remoteEntry.js with a global var name
myContent
, and all the chunks (in case i have).is it possible to get the same bundle behaviour such as the webpack generates?
i.e: webpack
ModuleFederationPlugin
bundle example:p.s: is it possible to use
iife
format and global var name with chunks?What is actually happening?
Can i still generate a global variable bundle
remoteEntry.js
, and still have more than 1 chunk, or anybody else has a workaround for this?