From 39a3301b598749a7557c3d783049896a5c9d06fc Mon Sep 17 00:00:00 2001 From: Damien Gether Date: Wed, 23 Jun 2021 12:11:09 -0400 Subject: [PATCH] Fix: dev css modules classnames should include filename Add the css module filename to avoid potential dev classname collisions. See: https://github.com/facebook/docusaurus/pull/5034 Docusaurus just merged this behaviour in master. I think this plugin should follow the same behaviour. Also, I personally encounter classname collisions in development. --- docusaurus-plugin-sass.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus-plugin-sass.js b/docusaurus-plugin-sass.js index 49384cf..bccc95c 100644 --- a/docusaurus-plugin-sass.js +++ b/docusaurus-plugin-sass.js @@ -15,7 +15,7 @@ module.exports = function(_, {id, ...options}) { modules: { localIdentName: isProd ? `[local]_[hash:base64:4]` - : `[local]_[path]`, + : `[local]_[path][name]`, exportOnlyLocals: isServer, }, importLoaders: 2,