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

Migrate to Vite #493

Merged
merged 3 commits into from
Oct 20, 2023
Merged

Migrate to Vite #493

merged 3 commits into from
Oct 20, 2023

Conversation

nikomakela
Copy link
Contributor

@nikomakela nikomakela commented Sep 27, 2023

Bases to the huge pile of upgrading and migration changes in #492.

The Create React App (CRA) is deprecated. It is advised to replace the CRA with Vite.

The migration process is done by following the instructions from
https://www.robinwieruch.de/vite-create-react-app/:

  • The index.html is moved from the /public to the root. The relative paths are migrated.
  • Vitest is installed and the configuration for testing-library is made

The Sass styles from HDS and the app itself needed a couple of aliases.

The new setup includes

  • Vite instead of CRA
  • Vitest with the Testing-library instead of Jest
  • Typescript for Vite

More about this:

@nikomakela nikomakela force-pushed the KK-1017-vite branch 2 times, most recently from ac04c6c to cbdac77 Compare September 28, 2023 06:44
@nikomakela nikomakela force-pushed the KK-1017-upgrade-deps branch 2 times, most recently from 31c7243 to d66a020 Compare September 28, 2023 08:22
@nikomakela nikomakela force-pushed the KK-1017-upgrade-deps branch 2 times, most recently from b84cdef to 17ebfdd Compare September 28, 2023 09:48
@nikomakela nikomakela force-pushed the KK-1017-vite branch 3 times, most recently from b7bb094 to c043d7f Compare September 28, 2023 11:10
@nikomakela nikomakela force-pushed the KK-1017-upgrade-deps branch from 85df974 to 3afc3dd Compare October 13, 2023 07:06
KK-1017.

The Create React App (CRA) is deprecated.
It is advised to replace the CRA for example with Vite.
For example the latest version of the Helsinki Design System (HDS)
does not work properly with the CRA.

The migration process is done by following the instructions from
https://www.robinwieruch.de/vite-create-react-app/:
- The index.html is moved from the `/public` to the root. The relative paths are migrated.
-  Vitest is installed and the configuration for testing-library is made

The Sass styles from HDS and the app itself needed a couple of aliases.

The new setup includes
- Vite instead of CRA
- Vitest with the Testing-library instead of Jest
- Typescript for Vite
KK-1017.

For some reason, the moment in event utils works
differently in Vite than what it worked in CRA.
However, the same method seems to work
when manually tested on a running env.
@nikomakela nikomakela merged commit fccbc56 into KK-1017-upgrade-deps Oct 20, 2023
1 check passed
@nikomakela nikomakela deleted the KK-1017-vite branch October 20, 2023 11:59
@nikomakela nikomakela restored the KK-1017-vite branch October 20, 2023 12:15
@nikomakela
Copy link
Contributor Author

Actually, right after merging this to #492 , I realized that the pipeline is not ready for Vite's environment variables, so I reverted branch deletion. Unfortunately this PR is still shown as merged and I cannot remerge it, but the plan was to first take the #492 through the pipeline and then configure the pipeline to use vite-configs.

@nikomakela
Copy link
Contributor Author

This PR is recreated here: #496

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.

1 participant