hawtio / hawtio-next

Next generation Hawtio UI console
https://hawt.io
Apache License 2.0
7 stars 22 forks source link

Consider stopping the use of CRA #455

Closed tadayosi closed 5 months ago

tadayosi commented 1 year ago

Create React App (CRA) seems to be deprecated.

It shouldn't impact our development soon, because we use it only at the last stage of building a Hawtio app and @hawtio/react is built with tsup. It only affects the app test package in this project, and downsteam it should affect the way we bundle the hawtio-next console in the hawtio standalone project, and custom plugins that are built with hawtio-next.

But let's consider switching from CRA to some other framework in the mid term. Options include:

phantomjinx commented 1 year ago

Heavily into creating simple test apps for kubernetes & oauth in hawtio-online so can experiment with vite in them.

phantomjinx commented 1 year ago

Used the oauth test app in hawtio-online to protoype a pure-webpack build configuration, thus dropping craco and react-scripts.

tadayosi commented 1 year ago

Used the oauth test app in hawtio-online to protoype a pure-webpack build configuration, thus dropping craco and react-scripts.

@phantomjinx So you ejected CRA instead of trying Vite or something else? Did you have any problem with using Vite? Just out of curiosity.

phantomjinx commented 1 year ago

No. Actually, it didn't occur to me to try Vite or NextJS until I was halfway through. I'd already gone the pure-webpack route in my own project based on kaoto-ui so copied that process. I have the kubernete-api-app to convert from CRA as well so I can try that with Vite and see if its 'easier'.

phantomjinx commented 1 year ago

@tadayosi Had a first look at migrating kubernetes-api-app to vite and this was the result: https://github.com/hawtio/hawtio-online/issues/147

Appreciate if you have more experience of vite, could you have a look as I have probably overlooked something or made some newbie errors.

grgrzybek commented 8 months ago

Maybe not related, but I found interesting discussion about module-federation impact when using shared modules: https://medium.com/@marvusm.mmi/webpack-module-federation-think-twice-before-sharing-a-dependency-18b3b0e352cb