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(runtime): checking for remote entry type when loading assets #2753

Conversation

MadaraUchiha-314
Copy link
Contributor

@MadaraUchiha-314 MadaraUchiha-314 commented Jul 13, 2024

Description

  • Adds the script type check when loading ESM
  • This is to avoid the following error when loading ESM modules
Screenshot 2024-07-12 at 5 21 04 PM

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.

Copy link

changeset-bot bot commented Jul 13, 2024

🦋 Changeset detected

Latest commit: 1cc0ef7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 35 packages
Name Type
@module-federation/runtime Patch
@module-federation/devtools Patch
@module-federation/dts-plugin Patch
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/runtime-tools Patch
@module-federation/webpack-bundler-runtime Patch
@module-federation/modern-js Patch
@module-federation/enhanced Patch
@module-federation/rspack Patch
modernjs-ssr-dynamic-nested-remote Patch
modernjs-ssr-dynamic-remote-new-version Patch
modernjs-ssr-dynamic-remote Patch
modernjs-ssr-host Patch
modernjs-ssr-nested-remote Patch
modernjs-ssr-remote-new-version Patch
modernjs-ssr-remote Patch
3008-runtime-remote Patch
host Patch
host-v5 Patch
host-vue3 Patch
remote1 Patch
remote2 Patch
remote3 Patch
@module-federation/modernjs Patch
@module-federation/sdk Patch
@module-federation/managers Patch
@module-federation/manifest Patch
@module-federation/third-party-dts-extractor Patch
@module-federation/bridge-react Patch
@module-federation/bridge-vue3 Patch
@module-federation/bridge-shared Patch
@module-federation/bridge-react-webpack-plugin Patch
@module-federation/esbuild Patch
@module-federation/utilities Patch

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

Copy link

netlify bot commented Jul 13, 2024

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 1cc0ef7
🔍 Latest deploy log https://app.netlify.com/sites/module-federation-docs/deploys/66a854aeb287ac00085a3c56
😎 Deploy Preview https://deploy-preview-2753--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.

@MadaraUchiha-314
Copy link
Contributor Author

MadaraUchiha-314 commented Jul 14, 2024

@ScriptedAlchemy @2heal1 Are these tests flaky or should I look at why these are failing ?

@MadaraUchiha-314
Copy link
Contributor Author

I see that other PRs also have this problem. Can this be merged ?

@2heal1
Copy link
Member

2heal1 commented Jul 22, 2024

I have a question: Will you change the remote.type as 'module' ? Because we don't add the attr in manifest currently

@ScriptedAlchemy
Copy link
Member

@2heal1 isnt the remoteType in manifest "esm" when its esm mode?
I cannot remember the type we set for module

@zhoushaw zhoushaw changed the title fix: checking for remote entry type when loading assets fix(runtime): checking for remote entry type when loading assets Jul 22, 2024
@2heal1
Copy link
Member

2heal1 commented Jul 22, 2024

@ScriptedAlchemy I check the manifest again , the remoteInfo.type will use library.type first , so it can work as expected

@MadaraUchiha-314
Copy link
Contributor Author

Can we merge this ?

@MadaraUchiha-314
Copy link
Contributor Author

@ScriptedAlchemy @2heal1 This one liner PR has been waiting for almost 2 weeks. Can we merge it ?

@ScriptedAlchemy ScriptedAlchemy merged commit 67ea678 into module-federation:main Jul 30, 2024
2 checks passed
@MadaraUchiha-314 MadaraUchiha-314 deleted the preload-esm-js-assest-bug branch July 30, 2024 04:14
@2heal1 2heal1 mentioned this pull request Aug 6, 2024
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.

4 participants