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

Define ReactOnRails only once #1559

Conversation

rubenochiavone
Copy link
Contributor

@rubenochiavone rubenochiavone commented Jul 18, 2023

Summary

This avoids multiple calls to ReactOnRails.register to override each other.

Fixes #1558.

Pull Request checklist

Remove this line after checking all the items here. If the item is not applicable to the PR, both check it out and wrap it by ~.

  • Add/update test to cover these changes
  • Update documentation
  • Update CHANGELOG file
    Add the CHANGELOG entry at the top of the file.

This change is Reviewable

This avoids multiple calls to ReactOnRails.register to override each other.

Fixes #1558.
@ahangarha
Copy link
Contributor

@rubenochiavone I Just wanted to say to be aware that the failure of CI tests is not because of your change. There is an issue with WebDrive.

@justin808
Copy link
Member

As it is, this is the worst kind of fix: the one that hides a true bug.

This is worst than leaving the plain issue, which at least crashes.

I'm OK with changing this PR to throw a clear error message that one has a problem loading the same bundle multiple times or incorrectly configured bundles including React on Rails multiple times.

@justin808
Copy link
Member

@rubenochiavone open a new PR per my prior comment.

@justin808 justin808 closed this Jul 19, 2023
@rubenochiavone
Copy link
Contributor Author

Done @justin808. See #1562.

@justin808 justin808 deleted the rubenochiavone/fix-twice-components-crash-client-rendering branch July 21, 2023 01:26
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.

Client rendering crashes when configuring optimization.runtimeChunk to multiple
3 participants