Skip to content

1 install webpack #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@

The goal of this repo is be an example of a basic but functional app built on Express and Webpack.

If you want to follow along, start from master and look at the numbered branches of this project. Each one is a step along the path to creating a fully functional webpack setup. In each branch, there will be a documentation file that lists out the steps taken in that branch (each step is also a git commit if you look at the history) which you can use as a checklist when setting up your own projects.
If you want to follow along with the course, you will start from the master and switch to the appropriate numbered branches of this repo as needed. The branches are:
- [0-initial-setup](https://github.com/udacity/fend-webpack-content/tree/0-initial-setup)
- [1-install-webpack](https://github.com/udacity/fend-webpack-content/tree/1-install-webpack)
- [2-add-webpack-entry](https://github.com/udacity/fend-webpack-content/tree/2-add-webpack-entry)
- [3-webpack-output-and-loaders](https://github.com/udacity/fend-webpack-content/tree/3-webpack-output-and-loaders)
- [4-webpack-plugins](https://github.com/udacity/fend-webpack-content/tree/4-webpack-plugins)
- [5-webpack-mode](https://github.com/udacity/fend-webpack-content/tree/5-webpack-mode)
- [6-webpack-for-convenience](https://github.com/udacity/fend-webpack-content/tree/6-webpack-for-convenience)

Each one is a step along the path to creating a fully functional webpack setup. In each branch, there will be a documentation file that lists out the steps taken in that branch (each step is also a git commit if you look at the history) which you can use as a checklist when setting up your own projects.

## Get Up and Running

Expand All @@ -15,4 +24,4 @@ git clone -- [email protected]:[your-user-name]/webpack-express.git --
`cd` into your new folder and run:
- ```npm install```
- ```npm start``` to start the app
- this app runs on localhost:8080, but you can of course edit that in server.js
- this app runs on localhost:8080, but you can of course edit that in index.js
17 changes: 17 additions & 0 deletions STEP-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,20 @@ npm i webpack webpack-cli
```

You have been successful when you see webpack and webpack-cli added to your package.json dependencies

2. Get the basic webpack config up and running:

- [ ] Create a webpack.config.js file in the project root
- [ ] Add the new build npm script to your package.json ``` "build": "webpack" ```
- [ ] Fill your webpack config.js with the code below:

```
const path = require("path")
const webpack = require('webpack')

module.exports = {

}
```

You have been successful when you can run your npm script (`$ npm run build`) in the terminal and see a webpack error (the error is there of course because our config file is empty)
Loading