# Webpack and ReactJS

**URL:** <https://forum.kirupa.com/t/webpack-and-reactjs/640122>\
**Category:** programming\
**Created:** [August 5, 2019, 2:06pm UTC](https://forum.kirupa.com/t/webpack-and-reactjs/640122 "2019-08-05T14:06:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nazanin](https://avatars.discourse-cdn.com/v4/letter/n/8797f3/32.png) [@nazanin](https://forum.kirupa.com/u/nazanin)\
**Post date:** [August 5, 2019, 2:06pm UTC](https://forum.kirupa.com/t/webpack-and-reactjs/640122/1 "2019-08-05T14:06:46Z")

</div>

Hi guys,  
I have a project which I created by npm create-react-app, I setup the modules I need, it works totally fine.  
But now, I have to add Web Pack to the project.  
I read lots of tutorials, adding babel, web pack and react… but none of those work for me.  
Could you please let me know how I have web pack in my reactJS project?  
Thank you.

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [August 6, 2019, 12:09am UTC](https://forum.kirupa.com/t/webpack-and-reactjs/640122/2 "2019-08-06T00:09:32Z")

</div>

Hi nazanin!

I believe `create-react-app` already comes with webpack preconfigured. They don’t make it easy to override those settings. Have you looked into this thread: [https://stackoverflow.com/questions/48395804/where-is-create-react-app-webpack-config-and-files](https://stackoverflow.com/questions/48395804/where-is-create-react-app-webpack-config-and-files) ?

Thanks,  
Kirupa

---

<div class="post-metadata">

**Author:** ![nazanin](https://avatars.discourse-cdn.com/v4/letter/n/8797f3/32.png) [@nazanin](https://forum.kirupa.com/u/nazanin)\
**Post date:** [August 6, 2019, 5:04am UTC](https://forum.kirupa.com/t/webpack-and-reactjs/640122/3 "2019-08-06T05:04:54Z")

</div>

Thank you for your quick reply!  
If react comes with pre-configured webpack, how is minimization in building the app?  
Does this command “react-scripts build” do the minimization or is there any other way to do that?

---

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [August 6, 2019, 5:31am UTC](https://forum.kirupa.com/t/webpack-and-reactjs/640122/4 "2019-08-06T05:31:04Z")

</div>

When you do a `npm run build`, the appropriate webpack commands are run to create the minified version of your app. This is in contrast to `npm start` which is a development build that isn’t optimized for file size and minified.

🙂
