Update react-scripts

rect-scripts should be upgraded to the next major version so that other packeges can be upgraded too.

This is a problem. A lot of errors after the upgrade. At least some are related to this:

In short the problem is that webpack used to inclued polyfills for packages that are not intended to be used in the browser. These “node” packeges can be no longer included in the create react app projects.

This issue will likely never be fixed. Suggestions from the thread:

  • remove dependencies on js packages intended for node (official)
  • eject and add the polyfills to the webpack config
  • use react-app-rewired which allows to edit the config without ejecting. This sounds good until you read their readme which states:
    By doing this you're breaking the "guarantees" that CRA provides. That is to say you now "own" the configs. No support will be provided. Proceed with caution.
  • switch to vite, next.js or some other tool

There is one package causing the polyfill problem: safe-buffer
After some digging I found out that it is used by:

  • jsonwebtoken (probably redundant)
  • oidc-client this is a real problem

oidc-client is not maintained anymore, it is replaced by oidc-client-ts. It might solve the dependency issue.

Front end tooling was changed to VITE.
Deployment implications:

  • production build was located in build folder, now it is in dist

Development implications:

  • to start development server run yarn dev
  • css classes don’t contain their parent component names. This should be fixed in a future pull request.