File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ exports.astNodeVisitor = {
199199
200200 // Replace local types with the full `module:` path
201201 Object . keys ( identifiers ) . forEach ( key => {
202- const regex = new RegExp ( `(@ event |@ fires |[\{<\|,] ?!?)${ key } ` , 'g' ) ;
202+ const regex = new RegExp ( `@( event |fires |.* [\{<\|,] ?!?)${ key } ` , 'g' ) ;
203203 if ( regex . test ( comment . value ) ) {
204204 const identifier = identifiers [ key ] ;
205205 const absolutePath = path . resolve ( path . dirname ( currentSourceName ) , identifier . value ) ;
@@ -208,7 +208,7 @@ exports.astNodeVisitor = {
208208 const exportName = identifier . defaultImport ? getDefaultExportName ( moduleId , parser ) : key ;
209209 const delimiter = identifier . defaultImport ? '~' : getDelimiter ( moduleId , exportName , parser ) ;
210210 const replacement = `module:${ moduleId . replace ( slashRegEx , '/' ) } ${ exportName ? delimiter + exportName : '' } ` ;
211- comment . value = comment . value . replace ( regex , '$1' + replacement ) ;
211+ comment . value = comment . value . replace ( regex , '@ $1' + replacement ) ;
212212 }
213213 }
214214 } ) ;
You can’t perform that action at this time.
0 commit comments