K
K
kamelot432020-11-19 18:59:33
React
kamelot43, 2020-11-19 18:59:33

How to generate html when building an application on react.js?

There is a project written in React.js. In fact, these are laid-out blocks that are divided into react components. Logic is partially implemented in these components: switching tabs, switches and all sorts of things. When building a project in production, I get one index.html page, to which files with styles and many scripts are connected. The customer wants to be able to generate html and css during assembly. So that you can select from the html document and then do something with it. Is it possible to generate html and css when building a project on react?

5fb6966138ce8494436318.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir, 2020-11-19
@HistoryART

Xs on react like, but in next.js there is a build parameter for generating statics, google in this direction.

K
Kirill Makarov, 2020-11-19
@kirbi1996

Npm run build , but css will compress it for you for sure

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question