Skip to content
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

[Bug]: ModuleFederationPlugin remote not support IE11 #2360

Closed
wzc321 opened this issue May 16, 2024 · 5 comments
Closed

[Bug]: ModuleFederationPlugin remote not support IE11 #2360

wzc321 opened this issue May 16, 2024 · 5 comments
Labels
🐞 bug Something isn't working 🦀 Rspack related

Comments

@wzc321
Copy link

wzc321 commented May 16, 2024

Version

System:
    OS: Windows 10 10.0.17134
    CPU: (4) x64 Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
    Memory: 4.01 GB / 15.93 GB
Browsers:
    Edge: Spartan (42.17134.1098.0)
    Internet Explorer: 11.0.17134.1

Details

set browserslist:
"browserslist": [
"> 0.5%",
"not dead",
"IE 11"
]

set source.include
include: [/[\\/]node_modules[\\/]/], or
include: [ /[\\/]node_modules[\\/]@module-federation[\\/]/, { not: /[\\/]core-js[\\/]/ }, ],

and run npm run build the remoteEntry.js are many let and => but IE 11 not support

Reproduce link

https://github.com/rspack-contrib/rspack-examples/tree/main/rsbuild/module-federation

Reproduce Steps

1.Run npm install
2.Set package.json "browserslist": [ "> 0.5%", "not dead", "IE 11" ]
3.Set source.include
include: [/[\\/]node_modules[\\/]/], or
include: [ /[\\/]node_modules[\\/]@module-federation[\\/]/, { not: /[\\/]core-js[\\/]/ }, ],
4.Run npm run build

@wzc321 wzc321 added the 🐞 bug Something isn't working label May 16, 2024
@chenjiahan
Copy link
Member

chenjiahan commented May 17, 2024

@ahabhgk The module federation plugin uses data:application/node to create virtual module and can not be matched by any Rsbuild JS rules.

Can we change the data:application/node to data:text/javascript here?

https://github.com/web-infra-dev/rspack/blob/96d98de568856585c3e87be1508c3347e33a194a/packages/rspack/src/container/ModuleFederationPlugin.ts#L189-L190

@ahabhgk
Copy link
Contributor

ahabhgk commented May 17, 2024

I think we can change it if all tests pass

@chenjiahan
Copy link
Member

Get, I will try it

@wzc321
Copy link
Author

wzc321 commented May 17, 2024

Thanks for your reply, I do expect to fix this trouble in next release

@chenjiahan
Copy link
Member

Fixed in 0.7.0-beta.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🦀 Rspack related
Projects
None yet
Development

No branches or pull requests

3 participants