Skip to content
This repository has been archived by the owner on Sep 28, 2020. It is now read-only.

Commit

Permalink
README: Update Webpack 2.2) example (#139)
Browse files Browse the repository at this point in the history
* Update Webpack 2 example to latest documentation

* Updates the blurb mentioning the latest Webpack 2 release
  • Loading branch information
barraponto authored and MoOx committed Jan 11, 2017
1 parent dcdb4ad commit ca0af7a
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions README.md
Expand Up @@ -54,21 +54,25 @@ module.exports = {
}
```

[webpack@2.1.0-beta.23 has breaking changes](https://github.com/webpack/webpack/releases).
`preLoaders` is removed from the webpack^2.1.0-beta.23. so move it to `loaders` and using [enforce: "pre"] instead.
[webpack@2.2.0-rc.3 has breaking changes](https://github.com/webpack/webpack/releases).
`preLoaders` is removed from the webpack^2.1.0-beta.23. so move it to `rules` and use `enforce: "pre"` instead.

```js
module.exports = {
// ...
// entry, output, other top-level options ...
module: {
loaders: [
{enforce: "pre", test: /\.js$/, loader: "eslint-loader", exclude: /node_modules/}
// ... other loader
]
}
// ...
}
```
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
enforce: 'pre',
use: [{loader: 'eslint-loader', options: {rules: {semi: 0}}],
},
// other rules
],
},
// no need for plugins
};```
### Options
Expand Down

0 comments on commit ca0af7a

Please sign in to comment.