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

fix(enhanced): EagerModules to hoist internal runtime packages into runtime chunks #2238

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

ScriptedAlchemy
Copy link
Member

@ScriptedAlchemy ScriptedAlchemy commented Mar 27, 2024

Description

Optimization allows only 1 runtime to be assigned to chunk

Fix multiple runtime id caused by conflicts in chunk integration.
Remove use of entrypoint prepending to inject runtime code
Implement EagerModule convention to hoist eager modules into runtime modules, without attaching them to share scope.

Related Issue

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

@ScriptedAlchemy ScriptedAlchemy changed the title fix(enhanced): ensure chunk integration is only assigned one runtime fix(enhanced): EagerModules to hoist internal runtime packages into runtime chunks Mar 29, 2024
@ScriptedAlchemy ScriptedAlchemy force-pushed the fix/chunk-runtime-integration branch 2 times, most recently from fc73de6 to 911d04d Compare March 30, 2024 02:55
await __webpack_init_sharing__('default');
expect(require('package')).toBe(42);
await new Promise((r) => {
setTimeout(r, 1000);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because plugins start behind async boundary, test exists while require call is triggering

ScriptedAlchemy and others added 5 commits March 30, 2024 14:19
Copy link

netlify bot commented Apr 7, 2024

Deploy Preview for module-federation-new ready!

Name Link
🔨 Latest commit 5dc96dc
🔍 Latest deploy log https://app.netlify.com/sites/module-federation-new/deploys/66123f00f92d6d0008d1098d
😎 Deploy Preview https://deploy-preview-2238--module-federation-new.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Apr 7, 2024

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 5dc96dc
🔍 Latest deploy log https://app.netlify.com/sites/module-federation-docs/deploys/66123f00717d350008b1833b
😎 Deploy Preview https://deploy-preview-2238--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants