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 issues related to hmr, isomorphic loading, error reporting #1915

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ashuverma
Copy link
Contributor

@ashuverma ashuverma commented Nov 21, 2022

  • Don't inject hot-update bundles in the template to avoid below error:

Screenshot 2022-11-22 at 12 06 13 AM

  • Add crossorigin="anonymous" to our scripts for error reporting. By default, error message will include only Script Error.
  • Skip container entry to avoid errors while refreshing apps on server

Screenshot 2022-11-21 at 11 55 39 PM

  • Handle isomorphic loading e.g. images, css modules etc. during first load, the app will start before webpack finish compiling, so webpack will inform app that modules refreshed when they didn't. sets a one time flag to avoid refreshing when first start up, reset this one time flag only after isomorphic initialise is set.

  • mark eager: true temporarily to avoid shared eager. For long term, will be adding automated way via plugin.

@ashuverma ashuverma marked this pull request as draft November 21, 2022 19:56
if (context.user.headEntries) {
headSplits.push(`<link rel="preload" href="${jsBundle}" as="script">`);
}
a.push(`<script src="${jsBundle}" async></script>`);
a.push(`<script src="${jsBundle}" async crossorigin="anonymous"></script>`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @ashuverma Thanks for changes.
Looks like this change is causing a test failure for should load bundles for the subapp - Error: Timeout of 2000ms exceeded. . Do you know what is going wrong ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any examples where I can see this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @ashuverma I just ran fun test in the root folder after merging master with this branch
Screen Shot 2022-12-13 at 10 12 12 PM

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

Successfully merging this pull request may close these issues.

None yet

2 participants