diff --git a/frappe/build.js b/frappe/build.js index 6495e2a359..103b66fdaa 100644 --- a/frappe/build.js +++ b/frappe/build.js @@ -144,7 +144,7 @@ function get_compiled_file(file, output_path, minify, force_compile) { file_content = minify_js(file_content, file); } - if (file.endsWith('.js') && !file.includes('/lib/') && output_type === 'js' && !file.endsWith('class.js')) { + if (minify && file.endsWith('.js') && !file.includes('/lib/') && output_type === 'js' && !file.endsWith('class.js')) { file_content = babelify(file_content, file, minify); } diff --git a/frappe/commands/utils.py b/frappe/commands/utils.py index 0f68e7ddd6..ff606d940d 100644 --- a/frappe/commands/utils.py +++ b/frappe/commands/utils.py @@ -15,7 +15,9 @@ def build(make_copy=False, restore = False, verbose=False): import frappe.build import frappe frappe.init('') - frappe.build.bundle(False, make_copy=make_copy, restore = restore, verbose=verbose) + # don't minify in developer_mode for faster builds + no_compress = frappe.local.conf.developer_mode or False + frappe.build.bundle(no_compress, make_copy=make_copy, restore = restore, verbose=verbose) @click.command('watch') def watch():