Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
joeeames authored Feb 18, 2017
1 parent f5d9dc8 commit 07386fa
Showing 1 changed file with 74 additions and 1 deletion.
75 changes: 74 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Webpack Fundamentals Course

**This course is up to date.**
**This course is out of date.**

Webpack is now version 2, this course was built on version 1. Although most of the content of the course is still applicable, several small items have changed and will break through the course if you follow along. Notes to fix some of the issues follow here in this readme.

## Recent Updates

Expand Down Expand Up @@ -40,4 +42,75 @@ Finally, when adding jshint-loader in the Using Preloaders clip, you'll need to

This will prevent the jshint-loader module from erroring out.

### preLoader property no longer exists

The property preLoader no longer exists for the webpack configuration file. You will receive this error:
```
configuration.module has an unknown property 'preLoaders'.
```
A solution to this problem here:
http://stackoverflow.com/questions/39668579/webpack-2-1-0-beta-25-error-unknown-property-postloaders

So the code:
```javascript
module.exports = {
entry: ["./utils", "./app.js"],
output: {
filename: "bundle.js"
},
watch: true,

module: {
preLoaders: [
{
test: /\.js$/, // include .js files
exclude: /node_modules/, // exclude any and all files in the node_modules folder
loader: "jshint-loader"
}
],
loaders: [
{
test: /\.es6$/,
exclude: /node_modules/,
loader: "babel-loader"
}
]
},
resolve: {
extensions: ['.js','.es6']
}
}
```
Should now look like this:
```javascript
module.exports = {
entry: ["./utils", "./app.js"],
output: {
filename: "bundle.js"
},
watch: true,

module: {
loaders: [
{
test: /\.es6$/,
exclude: /node_modules/,
loader: "babel-loader"
},
{
test: /\.js$/,
exclude: /node_modules/,
loader: "jshint-loader",
enforce: 'pre'
}
]
},
resolve: {
extensions: ['.js','.es6']
}
}
```
(thank you to James Daniel)



0 comments on commit 07386fa

Please sign in to comment.