From 600ed691ba299849c7398731605201fdb4e9f6f6 Mon Sep 17 00:00:00 2001 From: Dan Wolff Date: Mon, 5 Feb 2018 23:31:28 +0100 Subject: [PATCH] move up section on debugging with source maps --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a34ba1f9..9b650f88 100644 --- a/README.md +++ b/README.md @@ -1103,6 +1103,14 @@ To enable fast minify mode with the API use: UglifyJS.minify(code, { compress: false, mangle: true }); ``` +#### Source maps and debugging + +Various `compress` transforms that simplify, rearrange, inline and remove code +are known to have an adverse effect on debugging with source maps. This is +expected as code is optimized and mappings are often simply not possible as +some code no longer exists. For highest fidelity in source map debugging +disable the Uglify `compress` option and just use `mangle`. + ### Compiler assumptions To allow for better optimizations, the compiler makes various assumptions. @@ -1117,11 +1125,3 @@ To allow for better optimizations, the compiler makes various assumptions. - Object properties can be added, removed and modified (not prevented with `Object.defineProperty()`, `Object.defineProperties()`, `Object.freeze()`, `Object.preventExtensions()` or `Object.seal()`). - -### Source maps and debugging - -Various `compress` transforms that simplify, rearrange, inline and remove code -are known to have an adverse effect on debugging with source maps. This is -expected as code is optimized and mappings are often simply not possible as -some code no longer exists. For highest fidelity in source map debugging -disable the Uglify `compress` option and just use `mangle`.