mlly
mlly copied to clipboard
Multiline comments are not stripped
Environment
Node v20.18.0, [email protected]
Reproduction
mlly.hasESMSyntax(`/* export * */`, { stripComments: false }) // true ✅
mlly.hasESMSyntax(`/* export * */`, { stripComments: true }) // false ✅
mlly.hasESMSyntax(`/*
export *
*/`, { stripComments: true }) // true ❌
Describe the bug
The strip comments functionality does not handle multiline comments resulting in incorrect results for hasESMSyntax and isValidNodeImport.
Additional context
No response
Logs
No response