Strip all comments and create a new file with only (JS) code
To handle codes, use a parser. Build an AST from parser (maybe comments are already removed there). And then convert it to codes. A FSM implementation may work. (I'm not sure). But I believe your current RegExp approach are far from working.
Anyway,
1. Line break
JavaScript support 5 different line terminator sequence. Your code only support one or two of them.
2. Single line comment
Line end no need to have ;.
var a = 42// comment

3. Multi line comment
Start / end of multi line comment no need to take a single line. They may appear on the same line.
var a = 42; /* comment */

var a = 42; /*
*/ var b = 42;

3. Some more complex comments
After you fix above issues, you are ready to handle more complex situations:
var a = 3
/*
*// 3;
/*/ /*/
/* // */
// /*
var b = 4;
// */

4. String and RegExp
Text in strings / regular expressions are not comments.
var a = '; // ';

var a = '\
// ';

var a = `
// `;

var a = /[; //]/;

This would be more complex if mix them up.
var c = `; // ${function () {
    a =  '}';
    // Wow, SO failed to use correct syntax highlight for this too!
}}`

5. HTML like comments
This could be optional. Most browsers supports HTML like comments. But this is not required to every JavaScript engine.
var a = 42;
--&gt; this is comment
&lt;!-- this is comment too

6. Shebang
It is up to you if you want to handle shebang as comments. They work on some browsers.
#!/usr/bin/node

var a = 42;