Skip to content

Commit 4364249

Browse files
committed
fix: allow users to override generateScopedName
b/c sometimes, the default doesn’t work out!
1 parent abe3c8a commit 4364249

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ module.exports = function (browserify, options) {
4747
// custom scoped name generation
4848
if (name === 'postcss-modules-scope') {
4949
options[name] = options[name] || {};
50-
options[name].generateScopedName = createScopedNameFunc(plugin);
50+
if (!options[name].generateScopedName) {
51+
options[name].generateScopedName = createScopedNameFunc(plugin);
52+
}
5153
}
5254

5355
if (name in options) {

0 commit comments

Comments
 (0)