-
Notifications
You must be signed in to change notification settings - Fork 6
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
Drop Create-React-App #766
Conversation
dist-vite is now dist, obsoleting the CRA build artifacts.
The 'scripts' directory is being removed with the removal of CRA.
start.js and build.js were the react-scripts entrypoints for CRA. They have been obsoleted by switching to Vite in the package.json scripts.
Utility/development scripts are now properly colocated in the bin/ folder, for consistency across projects/repositories.
Everything is replaced with Vite configuration.
These have been replaced with their VITE_* counterparts or are entirely obsoleted now.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #766 +/- ##
==========================================
+ Coverage 81.10% 81.42% +0.31%
==========================================
Files 235 235
Lines 4859 4851 -8
Branches 1324 1322 -2
==========================================
+ Hits 3941 3950 +9
+ Misses 888 870 -18
- Partials 30 31 +1 ☔ View full report in Codecov by Sentry. |
And some other stuff that appears to not be used anymore.
74f9aff
to
e8d8763
Compare
|
Another question about the Im seeing a TS error about the test config. I took a 'quick' look and came across this stack overflow discussion (yes, its a bit older..) https://stackoverflow.com/questions/72146352/vitest-defineconfig-test-does-not-exist-in-type-userconfigexport. One of the suggestions was about misaligned vite/vitest versions, so i took a look at that.. The vitest version that we use, "^2.1.8", is dependent on vite "^5.0.0". So i've changes the vite version locally to "^5.0.0", which solves the issue.. Is there a reason why we use version "^6.0.5" for vite? Another solution might would be to define the type ourselfs, or to move the test config to a separate file? |
Vite depends on rollup, so it's a transitive dependency :) The production build is made using rollup, in dev mode Vite uses native browser modules. |
Yes - it's a known issue - it's because Vitest officially only supports Vite 5 and support for Vite 6 is currently in beta (or RC) - I'm waiting for Vitest 3 to be stable and then we can upgrade and it should resolve the type error! There's a github issue in vitest for it. There are some dirty workarounds, but ultimately it's something that we just have to wait for.
It released just after doing the initial configuration and everything appears to work properly with Vite 6, and I don't want to "start" a new toolchain already on an outdated major version. IMO we can just ignore the type error for the time being because it doesn't break anything except cause some red lines in your editor, but my expectation and hope is that we won't have to touch this config file for a while now. |
Ah okay, yeah then waiting for that release sounds like a fine solution. Changing to a different Vite version will then indeed only create more work...
Yeah fair enough, it still works fine.. Hopefully a stable Vitest 3 will be released soon, so we can fix the typing issue :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the red numbers 😄
I think everything looks good. The typescript warning does kinda bother me, but hopefully we can fix that soon with a Vitest update
Partly closes #724
Good bye and thanks for all the fish.