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

Switch build to rspack and add react-fast-refresh #1040

Merged
merged 19 commits into from
Nov 11, 2024

Conversation

chrisirhc
Copy link
Contributor

@chrisirhc chrisirhc commented Nov 9, 2024


  • I understand that contributing to this repository will require me to agree with the CLA

Description

Rspack is rust-based web bundler that's intended to be a drop-in replacement for webpack that's fast.
The addition of react-fast-refresh now allows refreshes of React components in-place while the application is loaded without refreshing the page/window.

What I've tested so far manually:

  • npm run start:dev
  • npm run dist:mac

TODOs:

  • Clean up commits
  • Remove unrelated gist commits
  • Add video demo of react-fast-refresh
  • Validate all rspack package.json scripts are working

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings

Cap.2024-11-10.at.09.08.56.mp4

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 README.md
  • 📓 tech-docs
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

Copy link

socket-security bot commented Nov 9, 2024

Copy link

github-actions bot commented Nov 9, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@chrisirhc
Copy link
Contributor Author

chrisirhc commented Nov 9, 2024

Not sure what happened to #1039 , the github actions bot limited it my interactions after I accidentally clicked Close. I can't do anything with that PR. If anyone can close it for me that'd be great.

@chrisirhc
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@chrisirhc
Copy link
Contributor Author

recheck

@ra3orblade
Copy link
Contributor

Hello, thanks for the PR, I've checked the branch but npm run start:dev does not work through rspack, it is used for development purposes. And need to check the CI pipeline as well.

@chrisirhc
Copy link
Contributor Author

Hello, thanks for the PR, I've checked the branch but npm run start:dev does not work through rspack, it is used for development purposes. And need to check the CI pipeline as well.

Could you please share the error you're seeing?
I'm using that command to check and it works for me.

@chrisirhc chrisirhc marked this pull request as ready for review November 10, 2024 01:31
@chrisirhc chrisirhc changed the title Draft: Switch to rspack and add react-fast-refresh Switch build to rspack and add react-fast-refresh Nov 10, 2024
@chrisirhc
Copy link
Contributor Author

Took a first pass at cleaning up the PR so it's ready for a first review and comment.

@ra3orblade
Copy link
Contributor

ra3orblade commented Nov 11, 2024

Hello, thanks for the PR, I've checked the branch but npm run start:dev does not work through rspack, it is used for development purposes. And need to check the CI pipeline as well.

Could you please share the error you're seeing? I'm using that command to check and it works for me.

It works, but it works through webpack, maybe I didnt get something. I'll check again. Could you please rename webpack in all commands so it would be clear it's not webpack anymore?

@chrisirhc
Copy link
Contributor Author

chrisirhc commented Nov 11, 2024

It works, but it works through webpack, maybe I didnt get something. I'll check again. Could you please rename webpack in all commands so it would be clear it's not webpack anymore?

webpack-dev-server@5 is in use by rspack/server as per the documentation here. Is that what you meant?

I can rename the remaining occurrences of webpack which are in 3 package.json scripts. It's used in the name of the script.

@ra3orblade
Copy link
Contributor

It works, but it works through webpack, maybe I didnt get something. I'll check again. Could you please rename webpack in all commands so it would be clear it's not webpack anymore?

webpack-dev-server@5 is in use by rspack/server as per the documentation here. Is that what you meant?

I can rename the remaining occurrences of webpack which are in 3 package.json scripts. It's used in the name of the script.

I see, yes rename scripts pls.

@ra3orblade ra3orblade merged commit 8d1d20e into anyproto:main Nov 11, 2024
3 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 11, 2024
@ra3orblade
Copy link
Contributor

@chrisirhc merged, thanks! The code reload now works really fast.

@fuksman
Copy link
Member

fuksman commented Nov 11, 2024

@any contributor @chrisirhc tooling

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

Successfully merging this pull request may close these issues.

3 participants