Skip to content

Commit 38445ad

Browse files
author
Artem Sapegin
committed
Docs: loaders → rules
1 parent de3ff80 commit 38445ad

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

docs/Webpack.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,18 @@ Then, create a webpack config, `webpack.config.js`:
122122

123123
```js
124124
module.exports = {
125-
module: {
126-
loaders: [
127-
{
128-
test: /\.jsx?$/,
129-
exclude: /node_modules/,
130-
loader: 'babel-loader',
131-
},
132-
],
133-
},
134-
},
125+
webpackConfig: {
126+
module: {
127+
rules: [
128+
{
129+
test: /\.jsx?$/,
130+
exclude: /node_modules/,
131+
loader: 'babel-loader'
132+
}
133+
]
134+
}
135+
}
136+
}
135137
```
136138

137139
If you don’t have Babel in your project, you need to install it with two presets — [env](https://babeljs.io/docs/en/babel-preset-env) and [react](https://babeljs.io/docs/en/babel-preset-react):

0 commit comments

Comments
 (0)