Discard unused resources on build.