Skip to content

Commit e25c845

Browse files
authored
Allow back ticks as prefix to classNameRegExp in html and js files
1 parent cfb1aa7 commit e25c845

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/optimizer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const optimize = (compiler, [file, originalSource], compilation, opts, classGene
2121
if (file.match(/.+\.css.*$/)) {
2222
classnameRegex = new RegExp(`\\\.(${opts.classNameRegExp})`, 'g');
2323
} else if (file.match(/.+\.js.*$/) || file.match(/.+\.html.*$/)) {
24-
classnameRegex = new RegExp(`["'.\\\s](${opts.classNameRegExp})`, 'g');
24+
classnameRegex = new RegExp(`["'\`.\\\s](${opts.classNameRegExp})`, 'g');
2525
}
2626
if (!classnameRegex) {
2727
return;

0 commit comments

Comments
 (0)