diff --git a/templates/html5/hxml/final.hxml b/templates/html5/hxml/final.hxml
index 26efad104..6380d12fd 100644
--- a/templates/html5/hxml/final.hxml
+++ b/templates/html5/hxml/final.hxml
@@ -3,4 +3,6 @@
-cp ::OUTPUT_DIR::/haxe
-D html5
-D html
--D final
\ No newline at end of file
+-D final
+-D js-flatten
+-dce full
\ No newline at end of file