0
votes

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.

2

2 Answers

1
votes

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

1
votes

Yes indeed, it is still webpack under the hood.

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