Do not delete "fake" source map comments from strings (#9960)
Instead of using `convert-source-map`'s `removeComments` method before parsing the file, we can first parse the file with `@babel/parser` and then analyze the comments. This is needed because it is not possible to reliabily detect comments in JavaScript without fully parsing the file: https://github.com/thlorenz/convert-source-map/issues/63
This commit is contained in:
@@ -181,7 +181,7 @@ declare module "convert-source-map" {
|
||||
fromJSON(str: string): Converter,
|
||||
fromBase64(str: string): Converter,
|
||||
fromComment(str: string): Converter,
|
||||
fromMapFileComment(str: string): Converter,
|
||||
fromMapFileComment(str: string, dir: string): Converter,
|
||||
fromSource(str: string): Converter,
|
||||
fromMapFileSource(str: string, dir: string): Converter,
|
||||
removeComments(str: string): string,
|
||||
|
||||
Reference in New Issue
Block a user