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

Feature/cra to vite #23

Merged
merged 6 commits into from
Jun 7, 2024
Merged

Feature/cra to vite #23

merged 6 commits into from
Jun 7, 2024

Conversation

sinejespersen
Copy link
Contributor

@sinejespersen sinejespersen commented Jun 7, 2024

As it seems CRA is no longer being maintained by fb, I am migrating to Vite.

  • npm upgrade
  • move from CRA -> Vite
  • node 18-> node 20
  • added some aria-labels to buttons

Comment on lines +31 to +36
VITE_APP_API_BASE=API_URL_HERE # most probably https://aapodwalk-api.local.itkdev.dk/
VITE_APP_API_ROUTE=api/v1/
VITE_APP_TOKEN=token_stuff_here # created in api (123?)

REACT_APP_DF_MAP_USERNAME=username_here # can be found in 1password
REACT_APP_DF_MAP_PASSWORD=password_here # can likewise be found in 1password
VITE_APP_DF_MAP_USERNAME=username_here # can be found in 1password
VITE_APP_DF_MAP_PASSWORD=password_here # can likewise be found in 1password
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need the name of something we use to build the project in variable names? Couldn't we just use APP_ as the prefix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

If I understand this correct, then yes.

https://vitejs.dev/guide/env-and-mode.html#env-files

src/index.jsx Outdated Show resolved Hide resolved
+ rather than interpolation, improved readability

Co-authored-by: Mikkel Ricky <rimi@aarhus.dk>
@sinejespersen sinejespersen merged commit 6968a85 into develop Jun 7, 2024
@sinejespersen sinejespersen deleted the feature/CRA-to-vite branch June 7, 2024 11:22
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.

2 participants