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

#1772 Replace React-hot-loader with React-fast-refresh #1773

Merged
merged 11 commits into from
Apr 12, 2024

Conversation

srikant-ch5
Copy link
Contributor

Fixes: #1772

Developer's Certificate of Origin 1.1

   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

@srikant-ch5 srikant-ch5 requested a review from nmgokhale March 26, 2024 10:42
@srikant-ch5
Copy link
Contributor Author

Reference: gaearon/react-hot-loader#1227 (comment)

@nmgokhale
Copy link
Member

This change works fine when I have checkbox_paramDef.json open, and I make a change in .jsx or .scss file, it gets reflected on the UI without error.

But when I make a change in .jsx or .scss file first and then I try to open checkbox_paramDef.json file, it throws a lot of errors.

@srikant-ch5
Copy link
Contributor Author

srikant-ch5 commented Apr 10, 2024

This change works fine when I have checkbox_paramDef.json open, and I make a change in .jsx or .scss file, it gets reflected on the UI without error.

But when I make a change in .jsx or .scss file first and then I try to open checkbox_paramDef.json file, it throws a lot of errors.

Hi @nmgokhale could you please verify latest changes to this PR in your local. I have replaced react-hot-loader with react-fast-refresh package.

These changes are working fine for me on dev local for .jsx and .scss changes.

@srikant-ch5 srikant-ch5 changed the title #1772 Resolve React Hot Loader Error in React 18 #1772 Replace React-hot-loader with React-fast-refresh Apr 10, 2024
@@ -73,7 +74,7 @@
"react-inlinesvg": "4.1.3",
"react-intl": "6.6.3",
"react-redux": "7.2.8",
"react-refresh": "0.14.0",
"react-refresh": "^0.14.0",
Copy link
Member

Choose a reason for hiding this comment

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

Any reason you're adding ^ to the versions? I think most if not all these should be static versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @matthoward366 It got added when I ran npm install -D @pmmmwh/react-refresh-webpack-plugin react-refresh now I have reverted it.

@@ -38,6 +38,7 @@
"@carbon/charts-react": "1.15.3",
"@carbon/react": "^1.52.0",
"@elyra/canvas": "file:../common-canvas",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
Copy link
Member

Choose a reason for hiding this comment

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

Remove react-hot-loader from package.json and pin this dependency as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @nmgokhale I have removed react-hot-loader package and pinned react-refresh-webpack-plugin in package.json, please review.

@matthoward366 matthoward366 merged commit a36457b into elyra-ai:main Apr 12, 2024
3 checks passed
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.

#3691 Resolve React Hot Loader Error in React 18
3 participants