Description
Feature Proposal
Two proposal variants:
- Export
defaultGetLocalIdent
- Allow to pass
customInterpolateName
as option to loader
Feature Use Case
Replace className part which is duplicated across components with some short placeholder:
[path][name]__[local]
-> src/blocks/button_link
and replace with cmp-button_link
With current options it is not possible without copy pasting code from defaultGetLocalIdent
.
localIdentRegExp
is not flexible enought for this case because it not allow to pass replacement string.
Please paste the results of npx webpack-cli info
here, and mention other relevant information
System:
OS: Windows 10 10.0.19043
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 9.51 GB / 23.86 GB
Binaries:
Node: 14.18.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD
npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 98.0.4758.102
Edge: Spartan (44.19041.1266.0), Chromium (98.0.1108.55)
Internet Explorer: 11.0.19041.1202
Monorepos:
Yarn Workspaces: 1.22.17
Packages:
karma-webpack: ^5.0.0 => 5.0.0
webpack: ^5.35.0 => 5.57.1
webpack-cli: ^4.6.0 => 4.7.2
webpack-merge: ^5.7.3 => 5.7.3