I have an error in my build file which created by webpack and there is this error:
Uncaught SyntaxError: Unexpected end of input.
I checked my file several times and I don't have any syntax error in build file and when I remove the function the error is still in the same line no matter what is in that line.
This is in explain of that error:
Uncaught SyntaxError: Unexpected end of input
Context
backgroundscript.js
Stack Trace
backgroundscript.js:2305 (anonymous function)
Code:
// Contents
"empty": function( elem ) {
// http://www.w3.org/TR/selectors/#empty-pseudo
// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
// but not by others (comment: 8; processing instruction: 7; etc.)
// nodeType < 6 works because attributes (2) do not appear as children
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { // error is in here
if ( elem.nodeType < 6 ) {
return false;
}
}
return true;
},
The error is in for loop line.