Pregunta

When our production app throws an error it's always on the same line and makes it extremely hard to debug. We've enabled source maps, but this is little help for various reasons. It would be so helpful if we could maintain line breaks when minifying the code which would give us a better clue as to where the problem is. Then I could at least hunt through the compressed code. Any way to do this?

¿Fue útil?

Solución

Well, you can always pass the -b option to UglifyJS (read here). This preserves the line breaks and indentation of the file.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top