-
-
Notifications
You must be signed in to change notification settings - Fork 268
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
feat(webpack-bundler-runtime): create container function #2440
Conversation
🦋 Changeset detectedLatest commit: ff6c8d2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 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. |
67325be
to
8a8c073
Compare
} | ||
|
||
export const createContainer = async (federationOptions: ExtendedOptions) => { | ||
// await instantiatePatch(federationOptions, true); |
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.
Commented out, used to support import maps, but should be implemented via sdk/import-maps instead of a patch on function
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.
Removing patch since something else should be cone for async container / initialization.
Can you share a bit more on the use case for this. I'm thinking its for cross bundler support but just making sure. |
Yeah. Using this for native federation currently (esbuild) We need a way to create containers at runtime, not just be able to consume them. |
58fa7d3
to
94e3631
Compare
How are you reusing this for esbuild ? I see a lot of webpack internals in the implementation of |
Its just the remoteEntry.js file output. This way i keep all the initialization code that webpack would normally perform during startup. Its just a webpack remoteEntry with chunk loading passed in as a object rather than at build time. it returns get,init and then user decides out to export it back. Im not currently importing it the same way in esbuild branch since its not merged, but i copy over the template code currently and inject the string version of this into the top of file. once merged it would just be import createConteiner and apply it in this file. |
Description
Implementation of container factory for at runtime container creation
I have also addded initial async function as well for container creation.
Related Issue
Types of changes
Checklist