Split main package file according to resource types