ucdavis / payments

Accept and process credit card payments on campus
MIT License
2 stars 3 forks source link

Move to CRA Create React App #308

Closed srkirkland closed 2 years ago

srkirkland commented 2 years ago

Removed all the webpack packages + config and added react-scripts. Rewrote boot index to respond to the two separate original buildpack locations and updated them to use context. Ripped out some weird composite HOC thing that didn't do much. Used new tsconfig but had to turn strict = false or else there would be millions of errors.

CSP was tricky -- the biggest changes were adding support for our HMR websocket and dumping the inline CRA bootloader. I ended up using some hacky code to grab the inline script and add a nonce to it.

Tested lightly locally and in prod. Since this is a react-only change it should only affect the create & edit invoice pages.

srkirkland commented 2 years ago

Looks good.

You don't like the npm install csproj targets that used a timestamp file?

Not that I don't like it, just that I replaced it with what I knew worked from harvest. But I don't have an issue with it and we can add it back later, if we do it'd be good to do on other apps too so we are consistent