It would be great to make use of the QtQuickCompiler available since Qt 5.11 to compile qml and js at build time.
It is not so straight forward as we currently don't use qt5_add_resources in our CMake, so it needs some more investigation.
Refs:
http://doc.qt.io/QtQuickCompiler/
http://doc.qt.io/QtQuickCompiler/qquickcompiler-building-with-cmake.html