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

Commit ca0af7a

Browse files
barrapontoMoOx
authored andcommitted
README: Update Webpack 2.2) example (#139)
* Update Webpack 2 example to latest documentation * Updates the blurb mentioning the latest Webpack 2 release
1 parent dcdb4ad commit ca0af7a

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,25 @@ module.exports = {
5454
}
5555
```
5656

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

6060
```js
6161
module.exports = {
62-
// ...
62+
// entry, output, other top-level options ...
6363
module: {
64-
loaders: [
65-
{enforce: "pre", test: /\.js$/, loader: "eslint-loader", exclude: /node_modules/}
66-
// ... other loader
67-
]
68-
}
69-
// ...
70-
}
71-
```
64+
rules: [
65+
{
66+
test: /\.js$/,
67+
exclude: /node_modules/,
68+
enforce: 'pre',
69+
use: [{loader: 'eslint-loader', options: {rules: {semi: 0}}],
70+
},
71+
// other rules
72+
],
73+
},
74+
// no need for plugins
75+
};```
7276
7377
### Options
7478

0 commit comments

Comments
 (0)