- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 298
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
perf(webpack-bundler-runtime): bundle sdk into output to help treeshake #3519
Conversation
🦋 Changeset detectedLatest commit: 509ef7a The changes in this PR will be included in the next version bump. This PR includes changesets to release 29 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Nice improvement! |
amazing! |
@@ -1,3 +1,3 @@ | |||
export const FEDERATION_SUPPORTED_TYPES = ['script']; | |||
|
|||
export { ENCODE_NAME_PREFIX } from '@module-federation/sdk'; | |||
// export { ENCODE_NAME_PREFIX } from '@module-federation/sdk'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we wnt this commaned out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this constant is not be used yet
473cbc3
to
d05a830
Compare
@@ -6,7 +6,6 @@ import { | |||
SEPARATOR, | |||
MANIFEST_EXT, | |||
} from './constant'; | |||
import { logger } from './logger'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate re-export
@@ -37,10 +37,6 @@ | |||
"import": "./dist/constant.esm.mjs", | |||
"require": "./dist/constant.cjs.js" | |||
}, | |||
"./container": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no used yet
Description
bundle sdk into output to help treeshake
At past, the bundler runtime will external sdk , and when user set externalRuntime: true , it can not easy to shake the useless sdk code .
Example file: https://github.com/module-federation/core/tree/main/apps/manifest-demo/3009-webpack-provider
before: 34 kb
after: 14 kb
Related Issue
Types of changes
Checklist