You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ React CSS Modules implement automatic mapping of CSS modules. Every CSS class is
21
21
-[Options](#options)
22
22
-[`allowMultiple`](#allowmultiple)
23
23
-[`errorWhenNotFound`](#errorwhennotfound)
24
-
–[React Hot Module Replacement](#react-hot-module-replacement)
24
+
-[React Hot Module Replacement](#react-hot-module-replacement)
25
25
-[Class Composition](#class-composition)
26
26
-[What Problems does Class Composition Solve?](#what-problems-does-class-composition-solve)
27
27
-[Class Composition Using CSS Preprocessors](#class-composition-using-css-preprocessors)
@@ -369,13 +369,13 @@ Throws an error when `styleName` cannot be mapped to an existing CSS Module.
369
369
370
370
## React Hot Module Replacement
371
371
372
-
Hot module reloadingdoes to reload the CSS (see https://github.com/gajus/react-css-modules/issues/51).
372
+
[Hot module reloading](https://github.com/gaearon/react-transform-hmr) (HMR) does to reload the CSS document (see https://github.com/gajus/react-css-modules/issues/51). It only reloads the `class` HTML attribute value.
373
373
374
-
To enable CSS reloading, my advise is to wrap your webpack setup using [BrowserSync](https://www.browsersync.io/). BrowserSync enables CSS reloading when it detects a file change.
374
+
To enable CSS reloading, wrap [`webpack-dev-server`](https://webpack.github.io/docs/webpack-dev-server.html) configuration using [BrowserSync](https://www.browsersync.io/). BrowserSync enables CSS reloading when it detects a file change.
375
375
376
-
[React CSS Modules examples](https://github.com/gajus/react-css-modules-examples) repository includes a configuration example using [BrowserSync](https://github.com/gajus/react-css-modules-examples/blob/master/webpack.config.browsersync.js).
376
+
[React CSS Modules examples](https://github.com/gajus/react-css-modules-examples) repository includes a configuration example using [BrowserSync configuration using webpack-dev-server](https://github.com/gajus/react-css-modules-examples/blob/master/webpack.config.browsersync.js).
377
377
378
-
Note that `webpackk-dev-server` program [does not write bundle files to the disk](https://github.com/webpack/webpack-dev-server/issues/62). You need to use a [write-file-webpack-plugin](https://github.com/gajus/write-file-webpack-plugin) plugin to force writing to the disk to enable BrowserSync to detect changes.
378
+
Note that `webpackk-dev-server` program [does not write bundle files to the disk](https://github.com/webpack/webpack-dev-server/issues/62). Use [write-file-webpack-plugin](https://github.com/gajus/write-file-webpack-plugin) plugin to force writing to the disk. This will enable BrowserSync to detect changes.
0 commit comments