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

chore: create-react migration to vite #289

Merged
merged 9 commits into from
Apr 17, 2023

Conversation

frmachao
Copy link
Contributor

@frmachao frmachao commented Apr 11, 2023

主要改动

  1. 将 apps/godwoken-bridge 项目从 create-react 迁移到 vite,来获得更好的开发体验

迁移前后对比:

  启动用时 构建用时 热更新
Vite 368ms 27s 毫秒级
CRA 23s 38s 1~2秒

界面截图

image

image

image

检查清单

  • apps/godwoken-bridge 项目应该可以正常 start
  • apps/godwoken-bridge 项目应该可以正常 build

@vercel
Copy link

vercel bot commented Apr 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
godwoken-bridge-mainnet ✅ Ready (Inspect) Visit Preview Apr 17, 2023 6:21am
godwoken-bridge-testnet ✅ Ready (Inspect) Visit Preview Apr 17, 2023 6:21am

Copy link
Collaborator

@ShookLyngs ShookLyngs left a comment

Choose a reason for hiding this comment

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

Great work, apparently vite is a better choice for building spa now days, and the pull request does its job with minimal cost. However, there is an issue that needs to be fixed: types for vite and svgr are now missing, so tsc command cannot pass, you can fix it by adding the following declarations to the project:

/// <reference types="vite/client" />
/// <reference types="vite-plugin-svgr/client" />

One more thing, since we are moving from cra to vite, maybe the src/react-app-env.d.ts file is no longer needed?

@ShookLyngs ShookLyngs requested a review from Dawn-githup April 12, 2023 03:24
@codecov-commenter
Copy link

codecov-commenter commented Apr 12, 2023

Codecov Report

❗ No coverage uploaded for pull request base (develop@7c18723). Click here to learn what that means.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Impacted file tree graph

@@            Coverage Diff             @@
##             develop     #289   +/-   ##
==========================================
  Coverage           ?   65.26%           
==========================================
  Files              ?       39           
  Lines              ?     6161           
  Branches           ?      236           
==========================================
  Hits               ?     4021           
  Misses             ?     2137           
  Partials           ?        3           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7c18723...b9e9e8d. Read the comment docs.

@ShookLyngs
Copy link
Collaborator

@frmachao @Flouse #290 has been merged before this, maybe we need a rebase?

@Flouse
Copy link
Collaborator

Flouse commented Apr 15, 2023

@frmachao @Flouse #290 has been merged before this, maybe we need a rebase?

yep, it requires a git rebase.
The plan is to include this PR in the next mirror release, and we can do a git rebase before then.

@frmachao
Copy link
Contributor Author

@frmachao @Flouse #290 has been merged before this, maybe we need a rebase?

yep, it requires a git rebase. The plan is to include this PR in the next mirror release, and we can do a git rebase before then.

Okay, I'll take care of it.

@frmachao
Copy link
Contributor Author

git rebase is done @Flouse

@frmachao
Copy link
Contributor Author

error Your lockfile needs to be updated, but yarn was run with –frozen-lockfile.
solution: Just run the yarn install command to update the yarn.lock file.

All tests have been passed @Flouse

@Flouse Flouse requested a review from classicalliu April 17, 2023 08:01
@Flouse
Copy link
Collaborator

Flouse commented Apr 17, 2023

error Your lockfile needs to be updated, but yarn was run with –frozen-lockfile. solution: Just run the yarn install command to update the yarn.lock file.

All tests have been passed @Flouse

Thank you!

@Flouse Flouse merged commit 108bfbe into godwokenrises:develop Apr 17, 2023
@frmachao frmachao deleted the feat-vite-mc branch April 17, 2023 08:36
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.

6 participants