-
Notifications
You must be signed in to change notification settings - Fork 4
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 from CRA to Vite #1379 #1380
base: react-18-#1205
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## react-18-#1205 #1380 +/- ##
===================================================
- Coverage 96.76% 86.42% -10.35%
===================================================
Files 48 56 +8
Lines 1763 8561 +6798
Branches 497 893 +396
===================================================
+ Hits 1706 7399 +5693
- Misses 53 1155 +1102
- Partials 4 7 +3 ☔ View full report in Codecov by Sentry. |
9882f3b
to
47c20d0
Compare
47c20d0
to
7cebf93
Compare
7747b8b
to
505728c
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## react-18-#1205 #1380 +/- ##
==================================================
+ Coverage 96.95% 97.62% +0.66%
==================================================
Files 49 54 +5
Lines 1775 5775 +4000
Branches 497 896 +399
==================================================
+ Hits 1721 5638 +3917
- Misses 50 134 +84
+ Partials 4 3 -1 ☔ View full report in Codecov by Sentry. |
5b0f17d
to
384f97b
Compare
Description
Replaces CRA with Vite. Used the default settings that create-vite would have generated in the tsconfig. The only real change caused by that is a requirement of underscores on some unused variable & I removed the props on the footer as they weren't either (
noUnusedParameters
).Draft as should not be merged until #1275 is.
Notes
react-redux-toastr
was incompatible (it used jsx in .js file) using old version, so upgraded v7.6.2 -> v7.6.13 which fixedclearInterval
inrouting.component.test.tsx
not being defined which was fixed by Component test with setTimeout and vitest fake timers not working testing-library/react-testing-library#1198{ shouldAdvanceTime: true }
in someuseFakeTimers
__mock__
not havingexpect.getState()
assigned as expected - fixed by mocking inside the test file itself (the token storage mock also needed to be hoisted to run correctly as it needed to be done before imports - see description here https://vitest.dev/api/vi#vi-hoisted)eslint-config-react-app
witheslint-plugin-react
,eslint-plugin-testing-library
andeslint-plugin-react-hooks
like Replace eslint-config-react-app with eslint-plugin-react and others #371 inventory-management-system#372react-app-polyfill
andcustom-event-polyfill
(IE is no longer supported anyway, also see https://vitejs.dev/guide/build#browser-compatibility, we could use @vitejs/plugin-legacy if required)browserslist-to-esbuild
to add support for browserslist (View the currently targeted builds usingnpx browserslist-to-esbuild
)Warning
The
index.html
has moved out of thepublic
folder into the root, sodocker-ims
needs to be updated on gitlab as the title can no longer be replaced as it used to be, and instead will be in/dist
after being built. Likely also effects any ansible config.Testing instructions
Add a set up instructions describing how the reviewer should test the code
Agile board tracking
Closes #1379