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 = {
199
199
200
200
// Replace local types with the full `module:` path
201
201
Object . keys ( identifiers ) . forEach ( key => {
202
- const regex = new RegExp ( `(@ event |@ fires |[\{<\|,] ?!?)${ key } ` , 'g' ) ;
202
+ const regex = new RegExp ( `@( event |fires |.* [\{<\|,] ?!?)${ key } ` , 'g' ) ;
203
203
if ( regex . test ( comment . value ) ) {
204
204
const identifier = identifiers [ key ] ;
205
205
const absolutePath = path . resolve ( path . dirname ( currentSourceName ) , identifier . value ) ;
@@ -208,7 +208,7 @@ exports.astNodeVisitor = {
208
208
const exportName = identifier . defaultImport ? getDefaultExportName ( moduleId , parser ) : key ;
209
209
const delimiter = identifier . defaultImport ? '~' : getDelimiter ( moduleId , exportName , parser ) ;
210
210
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 ) ;
212
212
}
213
213
}
214
214
} ) ;
You can’t perform that action at this time.
0 commit comments