Well, you can always pass the -b
option to UglifyJS (read here). This preserves the line breaks and indentation of the file.
How to preserve line breaks in UglifyJS?
-
01-07-2022 - |
Frage
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?
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow