We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fce605 commit 5a62d5dCopy full SHA for 5a62d5d
src/index.ts
@@ -48,9 +48,9 @@ export default function(
48
*/
49
function moduleMatchesOption(module, option) {
50
let [base] = module.split(path.sep)
51
- return [option].some((opt: string) => {
+ return option.some((opt: string) => {
52
let pattern = JSON.parse(`{"regex": ${JSON.stringify(opt)}}`)
53
- return RegExp(`${pattern}$`).test(base)
+ return RegExp(`${pattern.regex}$`).test(base)
54
})
55
}
56
0 commit comments