anil sidhu
anil sidhu

Reputation: 963

Does React js use web-pack for make build before npm eject

After npm eject we can use web-pack for build and run react. But when we use npm run-build without ejecting is this case react still using the web-pack or not.

Upvotes: 0

Views: 67

Answers (2)

Ben Steward
Ben Steward

Reputation: 2408

Yes indeed, it is still webpack under the hood.

Some related reading: https://www.fullstackreact.com/p/using-webpack-with-create-react-app/

Upvotes: 1

Paul McLoughlin
Paul McLoughlin

Reputation: 2289

If you look in the package.json that comes with CRA, you will see

"scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }

This shows what commands executed when you use npm start or npm build The Webpack build tools are hidden inside react-scripts

Upvotes: 1

Related Questions