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
I propose that we update the getLocalIdent parameters to pass whether the localName selector is an id or class.
Currently you can pass a custom function for getLocalIdent however there is no way to determine whether the localName parameter is an id or class.
Upon examining the Utils.js file it utilizes "postcss-modules-scope" package and passes a "generateScopedName" function. This function passes (exportName, resourceFile, rawCss) parameters. Currently css-loader only makes use of the exportName parameter. Using the rawCss parameter we can determine if the exportName is an id or class and pass this info to the getLocalIdent function.
Feature Use Case
I would like the ability to only transform class names and not transform id. This is because keeping the original id is useful for anchoring (href="#section1") as well as code that rely on finding elements by id (automated tests, analytics, vanilla js, etc).
Please paste the results of npx webpack-cli info here, and mention other relevant info
Feature Proposal
I propose that we update the getLocalIdent parameters to pass whether the localName selector is an id or class.
Currently you can pass a custom function for getLocalIdent however there is no way to determine whether the localName parameter is an id or class.
Upon examining the Utils.js file it utilizes "postcss-modules-scope" package and passes a "generateScopedName" function. This function passes (exportName, resourceFile, rawCss) parameters. Currently css-loader only makes use of the exportName parameter. Using the rawCss parameter we can determine if the exportName is an id or class and pass this info to the getLocalIdent function.
Feature Use Case
I would like the ability to only transform class names and not transform id. This is because keeping the original id is useful for anchoring (href="#section1") as well as code that rely on finding elements by id (automated tests, analytics, vanilla js, etc).
Please paste the results of
npx webpack-cli info
here, and mention other relevant infoThe text was updated successfully, but these errors were encountered: