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: migrate from CRA and Jest to Vite and Vitest #1279

Merged
merged 4 commits into from
Jun 10, 2023

Conversation

il3ven
Copy link
Contributor

@il3ven il3ven commented Jun 6, 2023

This PR migrates the codebase from CRA and Jest to Vite and Vitest.

Changes:

  • Update public folder in firebase.json to dist from build
  • Change REACT_APP env variables to VITE_APP
  • Move index.html to root as it is required by Vite
  • Update packages like use-debounce, json2csv as their newer versions have proper support for ESM
  • Remove esModuleInterop from tsconfig to keep our app as close as possible to create-vite-app template
  • Instead of Webpack's raw-loader use Vite specific loader argument
  • Use import.meta.env instead of process.env as recommended by Vite
  • Migrated to Vitest from Jest. Vitest has better ecosystem integration with Vite and its API is also similar to Jest.
  • Add colord because it was missing from package.json.

Checking out to this PR won't work. To test locally you'll have to checkout to rowyio/form-builder#10 and use yarn link. I have made some changes to that package. Reason for the change is explained in rowyio/form-builder#10.

I have tested the changes locally after linking to @rowy/form-builder. yarn build, yarn start work as expected. yarn test fails with a firebase auth/network-request-failed. ( Help needed )

For this PR, I have used @vitejs/plugin-react and not @vitejs/plugin-react-swc because jotai doesn't support fully support swc. I did try swc at first but it didn't work.

Fixes #1275
/claim #1275

@vercel
Copy link

vercel bot commented Jun 6, 2023

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

Name Status Preview Comments Updated (UTC)
rowy-os ❌ Failed (Inspect) Jun 10, 2023 2:01pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
rowy-typedoc ⬜️ Ignored (Inspect) Jun 10, 2023 2:01pm

@algora-pbc algora-pbc bot mentioned this pull request Jun 6, 2023
@vercel
Copy link

vercel bot commented Jun 6, 2023

@il3ven is attempting to deploy a commit to the Rowy Team on Vercel.

A member of the Team first needs to authorize it.

@il3ven il3ven changed the base branch from main to develop June 6, 2023 15:29
@shamsmosowi shamsmosowi merged commit 4ca336a into rowyio:develop Jun 10, 2023
@shamsmosowi
Copy link
Member

Thank you @il3ven ! it works perfectly!

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.

Chore: migrate to Vite
2 participants