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

Upgrade to vite 3 #148

Merged
merged 4 commits into from
Jul 30, 2022
Merged

Upgrade to vite 3 #148

merged 4 commits into from
Jul 30, 2022

Conversation

nvh95
Copy link
Member

@nvh95 nvh95 commented Jul 13, 2022

Goal

How to test

  • We need to test on Vercel preview page manually
  • We need to have some e2e tests here. Since integration tests only test the code at JSDOM level. It cannot test if our build process.

Caveats

Pending

  • Some issues with npm ci in GitHub Actions

@vercel
Copy link

vercel bot commented Jul 13, 2022

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

Name Status Preview Updated
bestofjs ✅ Ready (Inspect) Visit Preview Jul 30, 2022 at 3:44AM (UTC)

@nvh95
Copy link
Member Author

nvh95 commented Jul 13, 2022

@michaelrambeau
FYI Our integration tests with Jest cannot cover updates like this. So in the future, we need some end-to-end tests to cover some golden flows like #147

@nvh95 nvh95 marked this pull request as ready for review July 13, 2022 17:51
@michaelrambeau
Copy link
Member

michaelrambeau commented Jul 14, 2022

Thank you Hung @nvh95 for the update!

You like to live on "the bleeding edge", this is cool 😄

I checked the preview URL https://bestofjs-git-vite3-bestofjs.vercel.app/ and I noticed that fonts are not downloaded correctly.

We have errors like this:

downloadable font: rejected by sanitizer (font-family: "Open Sans" style:normal weight:400 stretch:100 src index:1) source: https://bestofjs-git-vite3-bestofjs.vercel.app/__VITE_PUBLIC_ASSET__03d6a1cf__

Oddly it works in local.

The good news is that the bundle size didn't increase: 174.53 kB

@nvh95
Copy link
Member Author

nvh95 commented Jul 19, 2022

@michaelrambeau It's actually a bug and being tracked here vitejs/vite#9174

@nvh95
Copy link
Member Author

nvh95 commented Jul 19, 2022

I commit a workaround (vitejs/vite#9174 (comment)) to solve the font issue.
But I think we can wait utill Vite fixes this problem.

@nvh95
Copy link
Member Author

nvh95 commented Jul 30, 2022

@michaelrambeau The font issue has been fixed in vite 3.0.4. Can you help to check it again? Thanks

Copy link
Member

@michaelrambeau michaelrambeau left a comment

Choose a reason for hiding this comment

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

👍 Fonts are now displayed correctly.

Thank you very much Hung for your investigation, contribution to Vite project and upgrade of Best of JS, you are the best 😄 !

@nvh95 nvh95 merged commit f925fc0 into develop Jul 30, 2022
@nvh95 nvh95 deleted the vite3 branch July 30, 2022 14:35
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.

None yet

2 participants