Search code examples
node.jsuglifyjs

Is there an option flag to ignore any javascript errors in uglifyjs?


I'm using uglifyjs module in node.js. When I use the following command to minify my scripts, I get a javascript parse error from uglifyjs. Is there a way to ignore it?

I like to check my js errors in browser, not with uglifyjs.

cat file1.js file2.js | uglifyjs -o minified.js


Solution

  • Uglification/minification tools need to completely rewrite your javascript. It won't be always possible rewrite it in a way that will preserve your error intact, and it is certainly not something that authors of such tools would waste time to implement.