Skip to content
This repository has been archived by the owner on Feb 12, 2025. It is now read-only.

chore: move to use vite as devtool #929

Merged
merged 11 commits into from
Dec 27, 2023

Conversation

shootermv
Copy link
Contributor

@shootermv shootermv commented Dec 21, 2023

Summary of changes

migrate project to use vite devtool because it more modern tool for react projects

Checklist

  • I have read and followed the contribution guidelines.
  • I have read through the Code of Conduct and agree to abide by the rules.
  • This PR is for one of the available issues and is not a PR for an issue already assigned to someone else.
  • My PR title has a short descriptive name so the maintainers can get an idea of what the PR is about.
  • I have provided a summary of my changes.

closes #928

Copy link

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
vite 5.0.10 network, filesystem, shell, environment +45 264 MB vitebot
vitest 1.1.0 filesystem, shell, environment +86 269 MB oreanno
vite-tsconfig-paths 4.2.2 network, filesystem, shell +48 265 MB aleclarson
@vitejs/plugin-react 4.2.1 network, shell +83 275 MB vitebot
@types/jest 27.5.1...29.5.11 eval +21/-5 2.91 MB types
@types/node 17.0.35...18.0.0 None +0/-0 1.7 MB types
@testing-library/jest-dom 5.16.1...6.1.5 shell +107/-12 271 MB testing-library-bot

🚮 Removed packages: [email protected]

@shootermv shootermv force-pushed the move-to-use-vite-devtool branch from b8d3db4 to 114a656 Compare December 21, 2023 19:39
@jdwilkin4
Copy link
Contributor

Hey @shootermv !

I was able to fork your copy of the project.
When I run it locally I get an error for the manifest.json

Screenshot 2023-12-21 at 8 05 56 PM

So I tried my own github pages build of the project and the build failed due to issues with the manifest.json
Screenshot 2023-12-21 at 8 07 03 PM

Also, I was googling around and for the gh-pages package we are using it looks like we need to update the deploy script to point to the dist folder instead of the build folder according to this article
https://dev.to/rashidshamloo/deploying-vite-react-app-to-github-pages-35hf

Since this is a migration, we will have to test actual builds of test sites to make sure that this PR doesn't accidentally break the production site.
I am testing everything by creating a github pages site on my forked copy of your fork.
I would suggest testing the builds on your end and seeing if you can your forked copy to build a github pages site to make sure the migration work.

Hope that helps 👍

@jdwilkin4
Copy link
Contributor

Here are my settings for testing the builds to GH pages

Screenshot 2023-12-21 at 8 15 35 PM

@shootermv
Copy link
Contributor Author

Sorry, totally my bad!
i will look to fix it asap

@shootermv
Copy link
Contributor Author

shootermv commented Dec 22, 2023

After looking at the tutorials you sent - i changed deployment script and was able to deploy to my gh-pages
Please check if you able to run & deploy the project now without issues...
p.s. Thank you for guidance!

Copy link
Contributor

@jdwilkin4 jdwilkin4 left a comment

Choose a reason for hiding this comment

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

Was able to play around with it locally and left a few comments 👍

vite.config.ts Outdated Show resolved Hide resolved
vite.config.ts Outdated Show resolved Hide resolved
vite.config.ts Outdated Show resolved Hide resolved
src/index.html Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
Copy link
Contributor

@jdwilkin4 jdwilkin4 left a comment

Choose a reason for hiding this comment

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

Was able to do a build and preview locally and it was working on my end.

So we should be good to go.
I vote we merge this in and see if the build goes through. 👍

Then if there are any issues, we can always roll back a commit to the old version and debug from there and try again 👍

I would suggest holding off on deleting this branch until we know the production build worked out

@jdwilkin4 jdwilkin4 merged commit b395ae0 into freeCodeCamp:main Dec 27, 2023
3 checks passed
@shootermv
Copy link
Contributor Author

Was able to do a build and preview locally and it was working on my end.

So we should be good to go.
I vote we merge this in and see if the build goes through. 👍

Then if there are any issues, we can always roll back a commit to the old version and debug from there and try again 👍

I would suggest holding off on deleting this branch until we know the production build worked out

Totally agree

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.

[General] - move this project developer setup to use vite server
2 participants