diff --git a/Makefile b/Makefile
index cc0089f2954c2b2d098864eb658bf7ed4842c23d..7358cac6c81265098d826df2694bda21a2c6aa63 100644
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,7 @@ $(eval $(call mkabspath,GLUON_PATCHESDIR))
 
 GLUON_MULTIDOMAIN ?= 0
 GLUON_DEBUG ?= 0
+GLUON_MINIFY ?= 1
 
 # Can be overridden via environment/command line/... to use the Gluon
 # build system for non-Gluon builds
@@ -53,7 +54,7 @@ src-link gluon_base ../../package
 endef
 
 GLUON_VARS = \
-	GLUON_RELEASE GLUON_REGION GLUON_MULTIDOMAIN GLUON_DEBUG GLUON_DEPRECATED GLUON_DEVICES \
+	GLUON_RELEASE GLUON_REGION GLUON_MULTIDOMAIN GLUON_DEBUG GLUON_MINIFY GLUON_DEPRECATED GLUON_DEVICES \
 	GLUON_TARGETSDIR GLUON_PATCHESDIR GLUON_TMPDIR GLUON_IMAGEDIR GLUON_PACKAGEDIR \
 	GLUON_SITEDIR GLUON_RELEASE GLUON_BRANCH GLUON_LANGS GLUON_BASE_FEEDS \
 	GLUON_TARGET BOARD SUBTARGET
diff --git a/docs/user/getting_started.rst b/docs/user/getting_started.rst
index b48c2674a3c87950a745f26761915409f59d4c48..f4be37fdf39025e82566443192a686951b0f19d1 100644
--- a/docs/user/getting_started.rst
+++ b/docs/user/getting_started.rst
@@ -212,6 +212,12 @@ GLUON_DEBUG
   Setting ``GLUON_DEBUG=1`` will provide firmware images including debugging symbols usable with GDB or
   similar tools. Requires a device or target with at least 16 MB of flash space, e.g. `x86-64`. Unset by default.
 
+GLUON_MINIFY
+  Setting ``GLUON_MINIFY=0`` will omit the minification of scripts during the build process. By 
+  default the flag is set to ``1``. Disabling the flag is handy if human readable scripts on the
+  devices are desired for development purposes. Be aware that this will increase the size of the
+  resulting images and is therefore not suitable for devices with small flash chips.
+
 GLUON_DEVICES
   List of devices to build. The list contains the Gluon profile name of a device, the profile
   name is the first parameter of the ``device`` command in a target file.
diff --git a/package/gluon-core/Config.in b/package/gluon-core/Config.in
index 3f381f92b44869d5fa0fb49061d7ec8cd9c63728..9546514643b0a7093dadced86b9a78357e159450 100644
--- a/package/gluon-core/Config.in
+++ b/package/gluon-core/Config.in
@@ -347,3 +347,7 @@ config GLUON_SPECIALIZE_KERNEL
 	select KERNEL_IP_NF_NAT
 	select KERNEL_IP_NF_TARGET_MASQUERADE
 	select KERNEL_IP_NF_TARGET_REDIRECT
+
+config GLUON_MINIFY
+	bool "Minify Gluon scripts"
+	default y
diff --git a/package/gluon-status-page/Makefile b/package/gluon-status-page/Makefile
index 923f68c77ed0a664c6ea624533069761698fa15b..c30229e377f66cf0a5d4a9694f0e26fd4dcfcde1 100644
--- a/package/gluon-status-page/Makefile
+++ b/package/gluon-status-page/Makefile
@@ -10,12 +10,18 @@ define Package/gluon-status-page
   DEPENDS:=+gluon-web +gluon-neighbour-info +gluon-respondd +uhttpd +sse-multiplex +libiwinfo +libjson-c +libnl-tiny +libubus-lua
 endef
 
+PKG_CONFIG_DEPENDS += CONFIG_GLUON_MINIFY
+
 define Package/gluon-status-page/install
 	$(Gluon/Build/Install)
 
 	$(INSTALL_DIR) $(1)/lib/gluon/status-page/providers
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/stations $(1)/lib/gluon/status-page/providers/
 
+ifndef CONFIG_GLUON_MINIFY
+	$(CP) ./javascript/status-page.js $(1)/lib/gluon/status-page/www/static/status-page.js
+endif
+
 	$(INSTALL_DIR) $(1)/lib/gluon/status-page/view/
 	$(LN) /lib/gluon/web/i18n $(1)/lib/gluon/status-page/
 	$(LN) /lib/gluon/web/view/error $(1)/lib/gluon/status-page/view/
diff --git a/package/gluon.mk b/package/gluon.mk
index 7246a318cdff539426327a2ccc187be2a61634fe..b69caa81f5a6d92a5fe24520cea5a9e8865990d8 100644
--- a/package/gluon.mk
+++ b/package/gluon.mk
@@ -3,6 +3,10 @@ PKG_FILE_DEPENDS += $(GLUON_MK)
 
 PKG_BUILD_DEPENDS += luasrcdiet/host
 
+ifneq ($(wildcard ./luasrc/.),)
+	PKG_CONFIG_DEPENDS += CONFIG_GLUON_MINIFY
+endif
+
 ifneq ($(wildcard ./src/respondd.c),)
   PKG_BUILD_DEPENDS += respondd
 endif
@@ -57,12 +61,14 @@ endef
 define GluonSrcDiet
 	rm -rf $(2)
 	$(CP) $(1) $(2)
+ifdef CONFIG_GLUON_MINIFY
 	$(FIND) $(2) -type f | while read src; do \
 		if luasrcdiet --noopt-binequiv -o "$$$$src.o" "$$$$src"; then \
 			chmod $$$$(stat -c%a "$$$$src") "$$$$src.o"; \
 			mv "$$$$src.o" "$$$$src"; \
 		fi; \
 	done
+endif
 endef
 
 
diff --git a/targets/generic b/targets/generic
index fc4ed0ea9db37359ade7e6ebbbfbe3ed163ab216..7672833de1c8e420ec52c52fd7f86c910fc13baf 100644
--- a/targets/generic
+++ b/targets/generic
@@ -60,6 +60,9 @@ if istrue(env.GLUON_DEBUG) then
 	try_config 'CONFIG_TARGET_ROOTFS_PARTSIZE=500'
 end
 
+if not istrue(env.GLUON_MINIFY) then
+	config '# CONFIG_GLUON_MINIFY is not set'
+end
 
 packages {
 	'-odhcpd-ipv6only',