-
Notifications
You must be signed in to change notification settings - Fork 171
Migrate to rsbuild and swc #3131
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a preliminary quick review of the code changes, although I'm not too sure for the testing updates. As long as they are passing (which they appear to do so), I think it should not be too far off.
I have also yet to run the code locally, so here are just some questions and ideas from me after glancing over the changes, let me know what you think!
@@ -20,8 +21,7 @@ | |||
"format:tsx": "prettier --list-different \"src/**/*.{js,jsx,ts,tsx}\"", | |||
"format:scss": "prettier --list-different --parser scss \"src/**/*.scss\"", | |||
"format:ci": "yarn run format:tsx && yarn run format:scss", | |||
"start": "cross-env DISABLE_ESLINT_PLUGIN=true BROWSER=none PORT=8000 craco start", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we consider having start
alias dev
for those users still used to the old way of launching? Or do you think that is not necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just use start instead of dev
@@ -25,7 +25,8 @@ | |||
"test-coveralls": "./scripts/test-coveralls.sh", | |||
"update-ui-snapshots": "jest --updateSnapshot", | |||
"eslint": "eslint src", | |||
"prepare": "husky" | |||
"prepare": "husky", | |||
"preview": "rsbuild preview" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can have this as the new yarn start
command behaviour instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we shouldn't, because preview is to preview the production bundle (after running yarn build). We can just alias start to dev instead as per your comment above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this file be named globals.d.ts
or imports.d.ts
instead? Since it will be required at quite a high level, env
doesn't really make too much sense as this handles the import types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll make the changes later. Thanks!
Previously with Webpack it would compile away the dynamic import used to import modules (because there was no way to |
@leeyi45 I think I saw this comment somewhere, but wasn't too sure what it entailed in terms of testing. I had tried running some module code in the playground and it seems to work, though I'm not sure if that is what you mean. Would you mind checking as well? Thank you! |
Description
CRA is dead. Switch to rsbuild (which uses rspack → drop-in for webpack → powers CRA), but written in Rust so much faster.
Type of change
How to test
Everything should (and does) still work since it's effectively drop in.
Checklist