From the course: Building Modern Projects with React

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Building and serving with webpack

Building and serving with webpack

From the course: Building Modern Projects with React

Start my 1-month free trial

Building and serving with webpack

- [Instructor] So now that we've got a very simple React app setup, we need to set up Web Pack to actually build our app. And what were going to have web pack do for us is take the code in our source directory and perform some operations on it like converting the ES6 syntax and JSX to common JS and then host our public directory so that we can view our app in a browser. Before we get started let me just say that this is probably the least fun part of the whole process, especially if you're not familiar with web pack. But bear with me, I'll explain everything that goes into our web pack configuration and how it helps us. So the first thing were going to do is install all of the packages that were going to need. So open a terminal in our react-ecosystems directory here and type NPM install --save-dev webpack webpack-cli webpack-dev-server style-loader css-loader, and finally babel-loader. And were going to hit enter and…

Contents