From 77fe354a5ac65b4162452aca0d2c4ce3025574ea Mon Sep 17 00:00:00 2001 From: Dmitry Samsonov Date: Mon, 17 Sep 2018 17:06:38 +0200 Subject: [PATCH] docs(README): add note about hash collision problem --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d0b8f631..55f61d84 100644 --- a/README.md +++ b/README.md @@ -258,6 +258,8 @@ You can configure the generated ident with the `localIdentName` query parameter. } ``` +> ℹ️ Enabling this feature, you might run into hash collision problem. So if you have two separate modules built with webpack that have a file with the same relative path within the module, with the same classname in it, they will receive the same hash. In order to avoid that add `context: __dirname` to the css-loader's `options` + You can also specify the absolute path to your custom `getLocalIdent` function to generate classname based on a different schema. This requires `webpack >= 2.2.1` (it supports functions in the `options` object). **webpack.config.js**