Allow precompiled templates when JS_BUILD equals to true