How to create a bulletproof compilation script for a React application?

I have a slightly complicated React project - basically a package of sexual user interface components that I would like to put there so people can enjoy. The idea is that you modify App.js, cut out the bs you are using, click yarn buildor, npm run buildand end up with the build folder being self-contained, quenched, ready for deployment.

I know of two leading solutions: a react-scriptsone and a webpack. Assuming that I want my drilling peers to have a minimal configuration and working prod assembly, they can instantly connect and work, which path is the β€œbest” (fastest, easiest, most independent)?

I was given four days to do this. After two complete obscure signals, compilation errors and the general dysfunctionality of my assembly (regarding the use of both of the above methods), I take a step back, trying to wrap it around myself for the last time. For example, I have eleven questions about this, but I decided to go for a more general wording. Be careful.

+4
source share
1 answer

I suggest using CRA (create-react-app)

0
source

Source: https://habr.com/ru/post/1691112/


All Articles