diff --git a/src/index.ts b/src/index.ts index 054ac57..f895dcc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -26,7 +26,7 @@ export function definitionForModuleAndIdentifier(module: ECMAScriptModule, ident } export function identifierForContextKey(key: string): string | undefined { - const logicalName = (key.match(/^(?:\.\/)?(.+)(?:[/_-]controller\..+?)$/) || [])[1] + const logicalName = (key.match(/^(?:\.\/)?(.+)(?:[\/_-]controller\..+?)$/) || [])[1] if (logicalName) { return logicalName.replace(/_/g, "-").replace(/\//g, "--") }