Does this approach work when we have the template and style in separate files? I am having trouble to build the library successfully in that case.