metalhead696
metalhead696

Reputation: 345

Compiling React into Static Files

I'm building a web app with the frontend done in react, and I was wondering if it's possible to compile my react code into static HTML and JS files to be used with any server. So far I've been using the server run with

npm start

but for my final project I need to use a different one.

Upvotes: 2

Views: 1663

Answers (2)

B. De Greef
B. De Greef

Reputation: 121

npm run build

This command creates a built version of your application in the build folder

Upvotes: 4

Mosè Raguzzini
Mosè Raguzzini

Reputation: 15821

Static builds are a standard in react deploying pipelines. You have to setup a build pipeline with webpack configuring it for minification assets management and so on.

Upvotes: 0

Related Questions