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]: After moduleFederation is turned on, polyfill does not take effect. #3593

Open
nanianlisao opened this issue Sep 29, 2024 · 3 comments
Labels
🐞 bug Something isn't working

Comments

@nanianlisao
Copy link
Contributor

Version

latest

Details

The minimum configuration is as follows:

moduleFederation: {
    options: {},
  },
  output: {
    polyfill: 'entry',
    overrideBrowserslist: ['chrome 70'],
  },

At this time, corejs injection does not take effect.

In addition, this seems to be a problem with rspack, webpack is ok

Reproduce link

no

Reproduce Steps

no

@nanianlisao nanianlisao added the 🐞 bug Something isn't working label Sep 29, 2024
Copy link
Contributor

Hello @nanianlisao. Please provide a reproduction repository or online demo. For background, see Why reproductions are required. Thanks ❤️

@chenjiahan
Copy link
Member

You can find the core-js code in this chunk:

image

The default lib-polyfill chunk will not be generated when using moduleFederation.options, see https://rsbuild.dev/config/module-federation/options

image

@nanianlisao
Copy link
Contributor Author

@chenjiahan You need to run it under chrome 70, and then the following error will appear.

image

The problem is that the polyfill does not take effect, not the splitChunk rule.

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

No branches or pull requests

2 participants