Why not:
```
replace(/\/\*[\s\S]*\*\/|\/\/.*$]/gm, '')
```
Those non-capture groups seem redundant to me...