Skip to content

Commit 4aef38a

Browse files
SpaceK33zsararubin
authored andcommitted
Webpack -> webpack
1 parent 2596022 commit 4aef38a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/guides/hmr-react.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,19 +223,19 @@ export default App;
223223

224224
The important thing to note in the code above is the `module` reference.
225225

226-
1. Webpack will expose `module.hot` to our code since we set `devServer: { hot: true }`;
226+
1. webpack will expose `module.hot` to our code since we set `devServer: { hot: true }`;
227227

228228
2. Thus we can use the `module.hot` hook to enable HMR for specific resources (Here's `App.js`). The most important API here is `module.hot.accept`, which specifies how to handle changes to specific dependencies.
229229

230-
3. Note that because Webpack 2 has built-in support for ES2015 modules, you won't need to re-require your root component in `module.hot.accept`. To make this work, you need to change the Babel ES2015 preset in `.babelrc` to be:
230+
3. Note that because webpack 2 has built-in support for ES2015 modules, you won't need to re-require your root component in `module.hot.accept`. To make this work, you need to change the Babel ES2015 preset in `.babelrc` to be:
231231

232232
```
233233
["es2015", {"modules": false}]
234234
```
235235

236236
like what we did in [Babel Config](#babel-config). Note that disabling Babel's module plugin is not only necessary for HMR. If you don't disable it you'll run into many other issues (see [Migrating from v1 to v2](/guides/migrating/#mixing-es2015-with-amd-and-commonjs) and [webpack-tree-shaking](http://www.2ality.com/2015/12/webpack-tree-shaking.html)).
237237

238-
4. Note that if you're using ES6 modules in your Webpack 2 configuration file, and you change your `.babelrc` file in #3 above, you either need to use `require` or create two `.babelrc` files (issue [here](https://github.com/webpack/webpack.js.org/issues/154)):
238+
4. Note that if you're using ES6 modules in your webpack 2 configuration file, and you change your `.babelrc` file in #3 above, you either need to use `require` or create two `.babelrc` files (issue [here](https://github.com/webpack/webpack.js.org/issues/154)):
239239
* One in the project root directory with `"presets": ["es2015"]
240240
* One in the home directory for webpack to build. For this example, in `src/`.
241241

0 commit comments

Comments
 (0)